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

Side by Side Diff: Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Issue 429453010: Drop V8RecursionScope dependency on ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reorder cleanup methods per haraken 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/modules/indexeddb/IDBTransactionTest.cpp ('k') | Source/web/WebKit.cpp » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "modules/indexeddb/InspectorIndexedDBAgent.h" 32 #include "modules/indexeddb/InspectorIndexedDBAgent.h"
33 33
34 #include "bindings/core/v8/ExceptionState.h" 34 #include "bindings/core/v8/ExceptionState.h"
35 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 35 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
36 #include "bindings/core/v8/ScriptController.h" 36 #include "bindings/core/v8/ScriptController.h"
37 #include "bindings/core/v8/ScriptState.h" 37 #include "bindings/core/v8/ScriptState.h"
38 #include "bindings/core/v8/V8PerIsolateData.h"
38 #include "core/dom/DOMStringList.h" 39 #include "core/dom/DOMStringList.h"
39 #include "core/dom/Document.h" 40 #include "core/dom/Document.h"
40 #include "core/events/EventListener.h" 41 #include "core/events/EventListener.h"
41 #include "core/frame/LocalFrame.h" 42 #include "core/frame/LocalFrame.h"
42 #include "core/inspector/InspectorController.h" 43 #include "core/inspector/InspectorController.h"
43 #include "core/inspector/InspectorState.h" 44 #include "core/inspector/InspectorState.h"
44 #include "core/page/Page.h" 45 #include "core/page/Page.h"
45 #include "modules/IndexedDBNames.h" 46 #include "modules/IndexedDBNames.h"
46 #include "modules/indexeddb/DOMWindowIndexedDatabase.h" 47 #include "modules/indexeddb/DOMWindowIndexedDatabase.h"
47 #include "modules/indexeddb/IDBCursor.h" 48 #include "modules/indexeddb/IDBCursor.h"
48 #include "modules/indexeddb/IDBCursorWithValue.h" 49 #include "modules/indexeddb/IDBCursorWithValue.h"
49 #include "modules/indexeddb/IDBDatabase.h" 50 #include "modules/indexeddb/IDBDatabase.h"
50 #include "modules/indexeddb/IDBFactory.h" 51 #include "modules/indexeddb/IDBFactory.h"
51 #include "modules/indexeddb/IDBIndex.h" 52 #include "modules/indexeddb/IDBIndex.h"
52 #include "modules/indexeddb/IDBKey.h" 53 #include "modules/indexeddb/IDBKey.h"
53 #include "modules/indexeddb/IDBKeyPath.h" 54 #include "modules/indexeddb/IDBKeyPath.h"
54 #include "modules/indexeddb/IDBKeyRange.h" 55 #include "modules/indexeddb/IDBKeyRange.h"
55 #include "modules/indexeddb/IDBMetadata.h" 56 #include "modules/indexeddb/IDBMetadata.h"
56 #include "modules/indexeddb/IDBObjectStore.h" 57 #include "modules/indexeddb/IDBObjectStore.h"
57 #include "modules/indexeddb/IDBOpenDBRequest.h" 58 #include "modules/indexeddb/IDBOpenDBRequest.h"
58 #include "modules/indexeddb/IDBPendingTransactionMonitor.h"
59 #include "modules/indexeddb/IDBRequest.h" 59 #include "modules/indexeddb/IDBRequest.h"
60 #include "modules/indexeddb/IDBTransaction.h" 60 #include "modules/indexeddb/IDBTransaction.h"
61 #include "platform/JSONValues.h" 61 #include "platform/JSONValues.h"
62 #include "platform/weborigin/SecurityOrigin.h" 62 #include "platform/weborigin/SecurityOrigin.h"
63 #include "public/platform/WebIDBCursor.h" 63 #include "public/platform/WebIDBCursor.h"
64 #include "public/platform/WebIDBTypes.h" 64 #include "public/platform/WebIDBTypes.h"
65 #include "wtf/Vector.h" 65 #include "wtf/Vector.h"
66 66
67 using blink::TypeBuilder::Array; 67 using blink::TypeBuilder::Array;
68 using blink::TypeBuilder::IndexedDB::DatabaseWithObjectStores; 68 using blink::TypeBuilder::IndexedDB::DatabaseWithObjectStores;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 IDBOpenDBRequest* idbOpenDBRequest = static_cast<IDBOpenDBRequest*>(even t->target()); 172 IDBOpenDBRequest* idbOpenDBRequest = static_cast<IDBOpenDBRequest*>(even t->target());
173 IDBAny* requestResult = idbOpenDBRequest->resultAsAny(); 173 IDBAny* requestResult = idbOpenDBRequest->resultAsAny();
174 if (requestResult->type() != IDBAny::IDBDatabaseType) { 174 if (requestResult->type() != IDBAny::IDBDatabaseType) {
175 m_executableWithDatabase->requestCallback()->sendFailure("Unexpected result type."); 175 m_executableWithDatabase->requestCallback()->sendFailure("Unexpected result type.");
176 return; 176 return;
177 } 177 }
178 178
179 IDBDatabase* idbDatabase = requestResult->idbDatabase(); 179 IDBDatabase* idbDatabase = requestResult->idbDatabase();
180 m_executableWithDatabase->execute(idbDatabase); 180 m_executableWithDatabase->execute(idbDatabase);
181 IDBPendingTransactionMonitor::from(*context).deactivateNewTransactions() ; 181 V8PerIsolateData::from(m_executableWithDatabase->scriptState()->isolate( ))->ensureIDBPendingTransactionMonitor()->deactivateNewTransactions();
182 idbDatabase->close(); 182 idbDatabase->close();
183 } 183 }
184 184
185 private: 185 private:
186 OpenDatabaseCallback(ExecutableWithDatabase* executableWithDatabase) 186 OpenDatabaseCallback(ExecutableWithDatabase* executableWithDatabase)
187 : EventListener(EventListener::CPPEventListenerType) 187 : EventListener(EventListener::CPPEventListenerType)
188 , m_executableWithDatabase(executableWithDatabase) { } 188 , m_executableWithDatabase(executableWithDatabase) { }
189 RefPtr<ExecutableWithDatabase> m_executableWithDatabase; 189 RefPtr<ExecutableWithDatabase> m_executableWithDatabase;
190 }; 190 };
191 191
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName ); 775 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName );
776 } 776 }
777 777
778 void InspectorIndexedDBAgent::trace(Visitor* visitor) 778 void InspectorIndexedDBAgent::trace(Visitor* visitor)
779 { 779 {
780 visitor->trace(m_page); 780 visitor->trace(m_page);
781 InspectorBaseAgent::trace(visitor); 781 InspectorBaseAgent::trace(visitor);
782 } 782 }
783 783
784 } // namespace blink 784 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBTransactionTest.cpp ('k') | Source/web/WebKit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698