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

Unified Diff: Source/modules/indexeddb/IDBDatabase.cpp

Issue 213073004: Protecting against other possible uses of invalid V8 execution context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Noted in description that fix is speculative. Created 6 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 | Source/modules/indexeddb/IDBTransaction.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBDatabase.cpp
diff --git a/Source/modules/indexeddb/IDBDatabase.cpp b/Source/modules/indexeddb/IDBDatabase.cpp
index cfc48a33bd2e54a7380e037a116ed26e4723e579..5432f437cea92c9db6961ddddc55109f4b2335df 100644
--- a/Source/modules/indexeddb/IDBDatabase.cpp
+++ b/Source/modules/indexeddb/IDBDatabase.cpp
@@ -379,6 +379,8 @@ void IDBDatabase::enqueueEvent(PassRefPtr<Event> event)
bool IDBDatabase::dispatchEvent(PassRefPtr<Event> event)
{
IDB_TRACE("IDBDatabase::dispatchEvent");
+ if (m_contextStopped || !executionContext())
+ return false;
ASSERT(event->type() == EventTypeNames::versionchange || event->type() == EventTypeNames::close);
for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
if (m_enqueuedEvents[i].get() == event.get())
« no previous file with comments | « no previous file | Source/modules/indexeddb/IDBTransaction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698