Bug 868110 - Remove JS_GetGlobalObject from the IPC test-shell. r=luke
This one is easy to infer, because we subsequently call JS_CallFunctionValue, which asserts that cx, obj, and fval are all same-compartment. So assuming this code doesn't compartment mismatch right now, this should be equivalent.
This commit is contained in:
@@ -92,7 +92,7 @@ TestShellCommandParent::RunCallback(const nsString& aResponse)
|
||||
|
||||
JSAutoRequest ar(mCx);
|
||||
|
||||
JS::Rooted<JSObject*> global(mCx, JS_GetGlobalObject(mCx));
|
||||
JS::Rooted<JSObject*> global(mCx, JS_GetGlobalForObject(mCx, mCallback.ToJSObject()));
|
||||
NS_ENSURE_TRUE(global, JS_FALSE);
|
||||
|
||||
JSAutoCompartment ac(mCx, global);
|
||||
|
||||
Reference in New Issue
Block a user