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

Unified Diff: Source/platform/EventDispatchForbiddenScope.h

Issue 946833004: Reland of "Expose events in workers as per latest DOM specification" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 10 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/core/events/EventTarget.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/EventDispatchForbiddenScope.h
diff --git a/Source/platform/EventDispatchForbiddenScope.h b/Source/platform/EventDispatchForbiddenScope.h
index 8997d9d9869d2559c12d83587439945d76cf8173..ed04351930f637ece70c7235e3b6231a1e87b5ee 100644
--- a/Source/platform/EventDispatchForbiddenScope.h
+++ b/Source/platform/EventDispatchForbiddenScope.h
@@ -18,15 +18,13 @@ class EventDispatchForbiddenScope {
public:
EventDispatchForbiddenScope()
{
- if (!isMainThread())
- return;
+ ASSERT(isMainThread());
++s_count;
}
~EventDispatchForbiddenScope()
{
- if (!isMainThread())
- return;
+ ASSERT(isMainThread());
ASSERT(s_count);
--s_count;
}
@@ -43,6 +41,7 @@ public:
AllowUserAgentEvents()
: m_change(s_count, 0)
{
+ ASSERT(isMainThread());
}
~AllowUserAgentEvents()
« no previous file with comments | « Source/core/events/EventTarget.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698