mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Fix for bug 502617 (Crash when logging in to Facebook [@ JS_GetClass]). r/sr=smaug.
This commit is contained in:
parent
523fca9cea
commit
2092ff2028
@ -5409,7 +5409,12 @@ nsDOMConstructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
|
||||
// This might not be the right object, if XPCNativeWrapping
|
||||
// happened. Get the wrapped native for this object, then get its
|
||||
// JS object.
|
||||
nsContentUtils::XPConnect()->GetJSObjectOfWrapper(cx, dom_obj, &dom_obj);
|
||||
JSObject *wrapped_obj;
|
||||
nsresult rv = nsContentUtils::XPConnect()->GetJSObjectOfWrapper(cx, dom_obj,
|
||||
&wrapped_obj);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
dom_obj = wrapped_obj;
|
||||
}
|
||||
|
||||
JSClass *dom_class = JS_GET_CLASS(cx, dom_obj);
|
||||
if (!dom_class) {
|
||||
@ -5418,8 +5423,7 @@ nsDOMConstructor::HasInstance(nsIXPConnectWrappedNative *wrapper,
|
||||
}
|
||||
|
||||
const nsGlobalNameStruct *name_struct;
|
||||
nsresult rv = GetNameStruct(NS_ConvertASCIItoUTF16(dom_class->name),
|
||||
&name_struct);
|
||||
rv = GetNameStruct(NS_ConvertASCIItoUTF16(dom_class->name), &name_struct);
|
||||
if (!name_struct) {
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user