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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/V8PerIsolateData.h ('k') | Source/core/dom/Microtask.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 switch (feature) { 55 switch (feature) {
56 case v8::Isolate::kUseAsm: 56 case v8::Isolate::kUseAsm:
57 UseCounter::count(currentExecutionContext(isolate), UseCounter::UseAsm); 57 UseCounter::count(currentExecutionContext(isolate), UseCounter::UseAsm);
58 break; 58 break;
59 default: 59 default:
60 ASSERT_NOT_REACHED(); 60 ASSERT_NOT_REACHED();
61 } 61 }
62 } 62 }
63 63
64 V8PerIsolateData::V8PerIsolateData() 64 V8PerIsolateData::V8PerIsolateData()
65 : m_isolateHolder(adoptPtr(new gin::IsolateHolder())) 65 : m_destructionPending(false)
66 , m_isolateHolder(adoptPtr(new gin::IsolateHolder()))
66 , m_stringCache(adoptPtr(new StringCache(isolate()))) 67 , m_stringCache(adoptPtr(new StringCache(isolate())))
67 , m_hiddenValue(adoptPtr(new V8HiddenValue())) 68 , m_hiddenValue(adoptPtr(new V8HiddenValue()))
68 , m_constructorMode(ConstructorMode::CreateNewObject) 69 , m_constructorMode(ConstructorMode::CreateNewObject)
69 , m_recursionLevel(0) 70 , m_recursionLevel(0)
70 , m_isHandlingRecursionLevelError(false) 71 , m_isHandlingRecursionLevelError(false)
71 #if ENABLE(ASSERT) 72 #if ENABLE(ASSERT)
72 , m_internalScriptRecursionLevel(0) 73 , m_internalScriptRecursionLevel(0)
73 #endif 74 #endif
74 , m_gcEventData(adoptPtr(new GCEventData())) 75 , m_gcEventData(adoptPtr(new GCEventData()))
75 , m_performingMicrotaskCheckpoint(false) 76 , m_performingMicrotaskCheckpoint(false)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 { 116 {
116 if (m_liveRoot.isEmpty()) 117 if (m_liveRoot.isEmpty())
117 m_liveRoot.set(isolate(), v8::Null(isolate())); 118 m_liveRoot.set(isolate(), v8::Null(isolate()));
118 return m_liveRoot.getUnsafe(); 119 return m_liveRoot.getUnsafe();
119 } 120 }
120 121
121 void V8PerIsolateData::willBeDestroyed(v8::Isolate* isolate) 122 void V8PerIsolateData::willBeDestroyed(v8::Isolate* isolate)
122 { 123 {
123 V8PerIsolateData* data = from(isolate); 124 V8PerIsolateData* data = from(isolate);
124 125
126 ASSERT(!data->m_destructionPending);
127 data->m_destructionPending = true;
128
125 // Clear any data that may have handles into the heap, 129 // Clear any data that may have handles into the heap,
126 // prior to calling ThreadState::detach(). 130 // prior to calling ThreadState::detach().
127 data->m_idbPendingTransactionMonitor.clear(); 131 data->m_idbPendingTransactionMonitor.clear();
128 } 132 }
129 133
130 void V8PerIsolateData::destroy(v8::Isolate* isolate) 134 void V8PerIsolateData::destroy(v8::Isolate* isolate)
131 { 135 {
132 #if ENABLE(ASSERT) 136 #if ENABLE(ASSERT)
133 if (blink::Platform::current()->currentThread()) 137 if (blink::Platform::current()->currentThread())
134 isolate->RemoveCallCompletedCallback(&assertV8RecursionScope); 138 isolate->RemoveCallCompletedCallback(&assertV8RecursionScope);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 245 }
242 246
243 IDBPendingTransactionMonitor* V8PerIsolateData::ensureIDBPendingTransactionMonit or() 247 IDBPendingTransactionMonitor* V8PerIsolateData::ensureIDBPendingTransactionMonit or()
244 { 248 {
245 if (!m_idbPendingTransactionMonitor) 249 if (!m_idbPendingTransactionMonitor)
246 m_idbPendingTransactionMonitor = adoptPtr(new IDBPendingTransactionMonit or()); 250 m_idbPendingTransactionMonitor = adoptPtr(new IDBPendingTransactionMonit or());
247 return m_idbPendingTransactionMonitor.get(); 251 return m_idbPendingTransactionMonitor.get();
248 } 252 }
249 253
250 } // namespace blink 254 } // namespace blink
OLDNEW
« 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