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

Unified Diff: Source/core/dom/ScriptForbiddenScope.cpp

Issue 368853002: Add ScriptForbiddenScope to weak callbacks of DOM wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « Source/bindings/core/v8/ScriptWrappable.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptForbiddenScope.cpp
diff --git a/Source/core/dom/ScriptForbiddenScope.cpp b/Source/core/dom/ScriptForbiddenScope.cpp
index 81540dcb6f3ea68c3cd0d9ca2190b87b46401610..c7e164cd548c4393cff14b40a5dd82f19903c301 100644
--- a/Source/core/dom/ScriptForbiddenScope.cpp
+++ b/Source/core/dom/ScriptForbiddenScope.cpp
@@ -16,14 +16,15 @@ static unsigned s_scriptForbiddenCount = 0;
ScriptForbiddenScope::ScriptForbiddenScope()
{
- ASSERT(isMainThread());
- ++s_scriptForbiddenCount;
+ // FIXME: Support non-main threads.
+ if (isMainThread())
haraken 2014/07/03 01:56:19 Since ScriptWrappable and DOMWrapperMap are used i
+ ++s_scriptForbiddenCount;
}
ScriptForbiddenScope::~ScriptForbiddenScope()
{
- ASSERT(isMainThread());
- --s_scriptForbiddenCount;
+ if (isMainThread())
+ --s_scriptForbiddenCount;
}
bool ScriptForbiddenScope::isScriptForbidden()
« no previous file with comments | « Source/bindings/core/v8/ScriptWrappable.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698