Bug 963285 - CallSetup may set context options but not restore them , r=bz
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 24 Jan 2014 00:56:50 +0200
changeset 181993 1bee0e44d2694e4c7b9cdaf31a433aaf9a12a308
parent 181992 7f2628d413259910a75618739651fdb9c70ebca0
child 181994 dd67215720001b2988c43844b09d7f3cf8dd37b6
push id462
push userraliiev@mozilla.com
push dateTue, 22 Apr 2014 00:22:30 +0000
treeherdermozilla-release@ac5db8c74ac0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs963285
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 963285 - CallSetup may set context options but not restore them , r=bz
dom/bindings/CallbackObject.cpp
--- a/dom/bindings/CallbackObject.cpp
+++ b/dom/bindings/CallbackObject.cpp
@@ -146,17 +146,17 @@ CallbackObject::CallSetup::CallSetup(Cal
   // compartment that we ended up in with mAutoEntryScript above, because the
   // entry point is based off of the unwrapped callback (realCallback).
   mAc.construct(cx, mRootedCallable.ref());
 
   // And now we're ready to go.
   mCx = cx;
 
   // Make sure the JS engine doesn't report exceptions we want to re-throw
-  if (mExceptionHandling == eRethrowContentExceptions ||
+  if ((mCompartment && mExceptionHandling == eRethrowContentExceptions) ||
       mExceptionHandling == eRethrowExceptions) {
     mSavedJSContextOptions = JS::ContextOptionsRef(cx);
     JS::ContextOptionsRef(cx).setDontReportUncaught(true);
   }
 }
 
 bool
 CallbackObject::CallSetup::ShouldRethrowException(JS::Handle<JS::Value> aException)