Fixing bug 492706. Make sure to reset global variables in error cases too. r+sr=mrbkap@gmail.com, a=dveditz
git-svn-id: svn://10.0.0.236/trunk@257302 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3adc82a99a
commit
789a01e817
@ -6033,7 +6033,14 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
|
||||
if (!win->IsChromeWindow()) {
|
||||
rv = sXPConnect->GetXOWForObject(cx, scope, JSVAL_TO_OBJECT(v), &v);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to get XOW for window object!");
|
||||
|
||||
sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;
|
||||
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
JSAutoRequest ar(cx);
|
||||
@ -6142,8 +6149,15 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
|
||||
rv = sXPConnect->GetXOWForObject(cx, scope, JSVAL_TO_OBJECT(winVal),
|
||||
&winVal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to get XOW for window object!");
|
||||
|
||||
sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;
|
||||
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
PRBool ok =
|
||||
::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
|
||||
::JS_GetStringLength(str),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user