Fix bug 670319. r=jst

This commit is contained in:
Blake Kaplan 2011-08-30 15:25:59 -07:00
parent 03bf748a6a
commit b3a9afc939

View File

@ -2757,6 +2757,13 @@ nsXPCComponents_Utils::LookupMethod()
return NS_ERROR_XPC_BAD_CONVERT_JS;
JSObject* obj = JSVAL_TO_OBJECT(argv[0]);
while(obj && !obj->isWrapper() && !IS_WRAPPER_CLASS(obj->getClass()))
obj = JS_GetPrototype(cx, obj);
if(!obj)
return NS_ERROR_XPC_BAD_CONVERT_JS;
argv[0] = OBJECT_TO_JSVAL(obj);
rv = nsXPConnect::GetXPConnect()->GetJSObjectOfWrapper(cx, obj, &obj);
if(NS_FAILED(rv))
return rv;