Bug 1101416 - Don't assert against pending exceptions in AutoNoJSAPI. r=luke, r=smaug, a=lsblakk
authorBobby Holley <bobbyholley@gmail.com>
Wed, 17 Dec 2014 16:34:37 -0800
changeset 242513 5590fdb108c5143cb03edbf400a3a782be0e9c4c
parent 242512 7a83256f3e2f01706c9f373c1df534f1437fe46d
child 242514 e2c858e80cb1475fbc81e81f26573f539bc141d3
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke, smaug, lsblakk
bugs1101416
milestone36.0a2
Bug 1101416 - Don't assert against pending exceptions in AutoNoJSAPI. r=luke, r=smaug, a=lsblakk
dom/base/ScriptSettings.cpp
--- a/dom/base/ScriptSettings.cpp
+++ b/dom/base/ScriptSettings.cpp
@@ -556,18 +556,16 @@ AutoIncumbentScript::AutoIncumbentScript
   : ScriptSettingsStackEntry(aGlobalObject, /* aCandidate = */ false)
   , mCallerOverride(nsContentUtils::GetCurrentJSContextForThread())
 {
 }
 
 AutoNoJSAPI::AutoNoJSAPI(bool aIsMainThread)
   : ScriptSettingsStackEntry()
 {
-  MOZ_ASSERT_IF(nsContentUtils::GetCurrentJSContextForThread(),
-                !JS_IsExceptionPending(nsContentUtils::GetCurrentJSContextForThread()));
   if (aIsMainThread) {
     mCxPusher.emplace(static_cast<JSContext*>(nullptr),
                       /* aAllowNull = */ true);
   }
 }
 
 danger::AutoCxPusher::AutoCxPusher(JSContext* cx, bool allowNull)
 {