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 234262 b5fb6408eb279269d8566bc37bbcf177ccae77b0
parent 234261 f6020e8a9490b71a9d9b89c0dbb62a78e0e82dbf
child 234263 5475c6ac8a26c7d49dbc0ce0e49d0dad4bbae456
child 234267 81e0c927cdeceff2b1fd0022b7bfa0626e0d0dfc
push id4252
push userryanvm@gmail.com
push dateThu, 18 Dec 2014 19:32:41 +0000
treeherdermozilla-beta@b5fb6408eb27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke, smaug, lsblakk
bugs1101416
milestone35.0
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
@@ -504,18 +504,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)
 {