Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp

Issue 2608113002: WorkerGlobalScope: verify same-heap event listeners. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« 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/core/workers/WorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index 0021729972721813e929898fc7fcec62cb06a7e8..8f5f58086ddc2173907092df8160c9e4d507f74a 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -130,14 +130,16 @@ void WorkerGlobalScope::exceptionUnhandled(int exceptionId) {
void WorkerGlobalScope::registerEventListener(
V8AbstractEventListener* eventListener) {
+ // TODO(sof): remove once crbug.com/677654 has been diagnosed.
+ CHECK(&ThreadState::fromObject(this)->heap() == &ThreadState::fromObject(eventListener)->heap());
bool newEntry = m_eventListeners.add(eventListener).isNewEntry;
- RELEASE_ASSERT(newEntry);
+ CHECK(newEntry);
}
void WorkerGlobalScope::deregisterEventListener(
V8AbstractEventListener* eventListener) {
auto it = m_eventListeners.find(eventListener);
- RELEASE_ASSERT(it != m_eventListeners.end());
+ CHECK(it != m_eventListeners.end());
m_eventListeners.remove(it);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine