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

Unified Diff: Source/bindings/core/v8/V8PerIsolateData.cpp

Issue 555163005: Deactivate IDBTransactions created within Microtasks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove bogus line, clean up hideous conditional Created 6 years, 3 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/V8PerIsolateData.h ('k') | Source/core/dom/Microtask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8PerIsolateData.cpp
diff --git a/Source/bindings/core/v8/V8PerIsolateData.cpp b/Source/bindings/core/v8/V8PerIsolateData.cpp
index a1bd8584735efd5763fef1a1ca04355e10248ab8..d5aa45c6d7d8f79c13d732112242c2243266d8d0 100644
--- a/Source/bindings/core/v8/V8PerIsolateData.cpp
+++ b/Source/bindings/core/v8/V8PerIsolateData.cpp
@@ -62,7 +62,8 @@ static void useCounterCallback(v8::Isolate* isolate, v8::Isolate::UseCounterFeat
}
V8PerIsolateData::V8PerIsolateData()
- : m_isolateHolder(adoptPtr(new gin::IsolateHolder()))
+ : m_destructionPending(false)
+ , m_isolateHolder(adoptPtr(new gin::IsolateHolder()))
, m_stringCache(adoptPtr(new StringCache(isolate())))
, m_hiddenValue(adoptPtr(new V8HiddenValue()))
, m_constructorMode(ConstructorMode::CreateNewObject)
@@ -122,6 +123,9 @@ void V8PerIsolateData::willBeDestroyed(v8::Isolate* isolate)
{
V8PerIsolateData* data = from(isolate);
+ ASSERT(!data->m_destructionPending);
+ data->m_destructionPending = true;
+
// Clear any data that may have handles into the heap,
// prior to calling ThreadState::detach().
data->m_idbPendingTransactionMonitor.clear();
« no previous file with comments | « Source/bindings/core/v8/V8PerIsolateData.h ('k') | Source/core/dom/Microtask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698