Index: third_party/WebKit/Source/platform/ScriptForbiddenScope.h |
diff --git a/third_party/WebKit/Source/platform/ScriptForbiddenScope.h b/third_party/WebKit/Source/platform/ScriptForbiddenScope.h |
index 4aa19b5ff5e1ef72fd95d04ea849913d9a2bc385..b8ddadf0c4abd882d3f5c78575f1a99a717e3240 100644 |
--- a/third_party/WebKit/Source/platform/ScriptForbiddenScope.h |
+++ b/third_party/WebKit/Source/platform/ScriptForbiddenScope.h |
@@ -44,15 +44,11 @@ |
++s_scriptForbiddenCount; |
} |
static void exit() { |
- DCHECK(isMainThread()); |
DCHECK(s_scriptForbiddenCount); |
--s_scriptForbiddenCount; |
} |
static bool isScriptForbidden() { |
- // Check s_scriptForbiddenCount first to avoid any calls to isMainThread() |
- // since under normal situations where we check this (ex. inside |
- // V8ScriptRunner) the value should always be zero. |
- return s_scriptForbiddenCount && isMainThread(); |
+ return isMainThread() && s_scriptForbiddenCount; |
} |
private: |