Bug 1184280 - Remove warning about mDisabledJSAndPlugins being false. r=ehsan
authorEric Rahm <erahm@mozilla.com>
Wed, 15 Jul 2015 14:48:09 -0700
changeset 284761 9f7b5a358a7692659af7f79829d5d31f63894d25
parent 284760 a6d70c8955db1ce55d818976c795f45e040c781a
child 284762 fe2800b80350314ab5cdab826f69f2837a4c3fd6
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1184280
milestone42.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 1184280 - Remove warning about mDisabledJSAndPlugins being false. r=ehsan
editor/composer/nsEditingSession.cpp
--- a/editor/composer/nsEditingSession.cpp
+++ b/editor/composer/nsEditingSession.cpp
@@ -201,17 +201,19 @@ nsEditingSession::DisableJSAndPlugins(ns
   mDisabledJSAndPlugins = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsEditingSession::RestoreJSAndPlugins(nsIDOMWindow *aWindow)
 {
-  NS_ENSURE_TRUE(mDisabledJSAndPlugins, NS_OK);
+  if (!mDisabledJSAndPlugins) {
+    return NS_OK;
+  }
 
   mDisabledJSAndPlugins = false;
 
   nsIDocShell *docShell = GetDocShellFromWindow(aWindow);
   NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
 
   nsresult rv = docShell->SetAllowJavascript(mScriptsEnabled);
   NS_ENSURE_SUCCESS(rv, rv);