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:
Bobby Holley
2013-05-22 15:42:44 -06:00
parent e165009bf2
commit 05ca5b4ff0

View File

@@ -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);