Bug 940754 - Fix rooting hazard in WorkerPrivateParent::WrapObject() r=bent

This commit is contained in:
Jon Coppeard 2013-11-20 15:37:30 +00:00
parent cf6ff52940
commit 24477ef740

View File

@ -2159,7 +2159,8 @@ WorkerPrivateParent<Derived>::WrapObject(JSContext* aCx,
AssertIsOnParentThread();
JSObject* obj = WorkerBinding::Wrap(aCx, aScope, ParentAsWorkerPrivate());
JS::Rooted<JSObject*> obj(aCx, WorkerBinding::Wrap(aCx, aScope,
ParentAsWorkerPrivate()));
if (mRooted) {
PreserveWrapper(this);