mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1262630. Replace workers::GetGlobalObjectForGlobal with xpc::NativeGlobal. r=khuey
This commit is contained in:
parent
1998448029
commit
272e533b18
@ -101,7 +101,7 @@ CallbackObject::CallSetup::CallSetup(CallbackObject* aCallback,
|
||||
}
|
||||
} else {
|
||||
JSObject *global = js::GetGlobalForObjectCrossCompartment(realCallback);
|
||||
globalObject = workers::GetGlobalObjectForGlobal(global);
|
||||
globalObject = xpc::NativeGlobal(global);
|
||||
MOZ_ASSERT(globalObject);
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ WorkerRunnable::Run()
|
||||
|
||||
JSObject* global = JS::CurrentGlobalOrNull(cx);
|
||||
if (global) {
|
||||
globalObject = GetGlobalObjectForGlobal(global);
|
||||
globalObject = xpc::NativeGlobal(global);
|
||||
} else {
|
||||
globalObject = DefaultGlobalObject();
|
||||
}
|
||||
|
@ -863,26 +863,6 @@ WorkerDebuggerGlobalScope::Dump(JSContext* aCx,
|
||||
}
|
||||
}
|
||||
|
||||
nsIGlobalObject*
|
||||
GetGlobalObjectForGlobal(JSObject* global)
|
||||
{
|
||||
nsIGlobalObject* globalObject = nullptr;
|
||||
UNWRAP_WORKER_OBJECT(WorkerGlobalScope, global, globalObject);
|
||||
|
||||
if (!globalObject) {
|
||||
UNWRAP_OBJECT(WorkerDebuggerGlobalScope, global, globalObject);
|
||||
|
||||
if (!globalObject) {
|
||||
MOZ_ASSERT(IsDebuggerSandbox(global));
|
||||
globalObject = static_cast<SimpleGlobalObject*>(JS_GetPrivate(global));
|
||||
|
||||
MOZ_ASSERT(globalObject);
|
||||
}
|
||||
}
|
||||
|
||||
return globalObject;
|
||||
}
|
||||
|
||||
bool
|
||||
IsWorkerGlobal(JSObject* object)
|
||||
{
|
||||
|
@ -361,9 +361,6 @@ ThrowDOMExceptionForNSResult(JSContext* aCx, nsresult aNSResult);
|
||||
|
||||
} // namespace exceptions
|
||||
|
||||
nsIGlobalObject*
|
||||
GetGlobalObjectForGlobal(JSObject* global);
|
||||
|
||||
bool
|
||||
IsWorkerGlobal(JSObject* global);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user