Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: third_party/WebKit/Source/platform/ScriptForbiddenScope.h

Issue 2755143002: Revert of Avoid calling isMainThread() in the common cases when checking ScriptForbiddenScope::isSc… (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698