Bug 951407 - Fix two hazards introduced by bug 951282; r=sfink

This commit is contained in:
Terrence Cole 2013-12-17 14:24:22 -08:00
parent 5a1403e62a
commit 96e3d97817
2 changed files with 2 additions and 2 deletions

View File

@ -2153,7 +2153,7 @@ 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);

View File

@ -485,8 +485,8 @@ jsd_ValToStringInStackFrame(JSDContext* jsdc,
cx = jsdthreadstate->context;
JS_ASSERT(cx);
exceptionState = JS_SaveExceptionState(cx);
JS::RootedValue v(cx, val);
exceptionState = JS_SaveExceptionState(cx);
retval = JS::ToString(cx, v);
JS_RestoreExceptionState(cx, exceptionState);