Bug 963285 - CallSetup may set context options but not restore them , r=bz

This commit is contained in:
Olli Pettay 2014-01-24 00:56:50 +02:00
parent 0f318259cc
commit 0eb04a40df

View File

@ -151,7 +151,7 @@ CallbackObject::CallSetup::CallSetup(CallbackObject* aCallback,
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);