mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 910910 - Enable Event ctors in workers, r=khuey
--HG-- extra : rebase_source : 983d01d13aa66a8499350a4960b5913b22c9783a
This commit is contained in:
parent
6b3dfa04e1
commit
f5c09ae0aa
@ -1792,7 +1792,9 @@ GlobalObject::GlobalObject(JSContext* aCx, JSObject* aObject)
|
||||
nsISupports*
|
||||
GlobalObject::GetAsSupports() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (!NS_IsMainThread()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mGlobalObject) {
|
||||
return mGlobalObject;
|
||||
|
@ -1395,7 +1395,7 @@ WantsQueryInterface<T, true>
|
||||
{
|
||||
static bool Enabled(JSContext* aCx, JSObject* aGlobal)
|
||||
{
|
||||
return IsChromeOrXBL(aCx, aGlobal);
|
||||
return NS_IsMainThread() && IsChromeOrXBL(aCx, aGlobal);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "js/OldDebugAPI.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "mozilla/dom/DOMJSClass.h"
|
||||
#include "mozilla/dom/EventBinding.h"
|
||||
#include "mozilla/dom/EventTargetBinding.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/DOMExceptionBinding.h"
|
||||
@ -1097,6 +1098,7 @@ CreateDedicatedWorkerGlobalScope(JSContext* aCx)
|
||||
|
||||
// Init other paris-bindings.
|
||||
if (!DOMExceptionBinding::GetConstructorObject(aCx, global) ||
|
||||
!EventBinding::GetConstructorObject(aCx, global) ||
|
||||
!FileReaderSyncBinding_workers::GetConstructorObject(aCx, global) ||
|
||||
!ImageDataBinding::GetConstructorObject(aCx, global) ||
|
||||
!TextDecoderBinding::GetConstructorObject(aCx, global) ||
|
||||
|
Loading…
Reference in New Issue
Block a user