mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 979951: Always preserve the worker wrapper to ensure that we have something to tell us what compartment to enter. r=bent
This commit is contained in:
parent
1ba96b6e8c
commit
874b0f2877
@ -2142,7 +2142,15 @@ WorkerPrivateParent<Derived>::WrapObject(JSContext* aCx,
|
||||
|
||||
AssertIsOnParentThread();
|
||||
|
||||
return WorkerBinding::Wrap(aCx, aScope, ParentAsWorkerPrivate());
|
||||
// XXXkhuey this should not need to be rooted, the analysis is dumb.
|
||||
// See bug 980181.
|
||||
JS::Rooted<JSObject*> wrapper(aCx,
|
||||
WorkerBinding::Wrap(aCx, aScope, ParentAsWorkerPrivate()));
|
||||
if (wrapper) {
|
||||
MOZ_ALWAYS_TRUE(TryPreserveWrapper(wrapper));
|
||||
}
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
template <class Derived>
|
||||
|
Loading…
Reference in New Issue
Block a user