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

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

Issue 295163005: Remove ScriptState::current() from IDBRequest (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/modules/indexeddb/IDBTransactionTest.cpp ('k') | Source/web/tests/CustomEventTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
diff --git a/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
index 5f5abb722f3989e13c39fbd450fb89842247711a..71351b51e3e4f2cfb78a3795d0ebc9c32c2c89cc 100644
--- a/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
+++ b/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
@@ -191,7 +191,7 @@ void ExecutableWithDatabase::start(IDBFactory* idbFactory, SecurityOrigin*, cons
{
RefPtr<OpenDatabaseCallback> callback = OpenDatabaseCallback::create(this);
TrackExceptionState exceptionState;
- IDBOpenDBRequest* idbOpenDBRequest = idbFactory->open(context(), databaseName, exceptionState);
+ IDBOpenDBRequest* idbOpenDBRequest = idbFactory->open(scriptState(), databaseName, exceptionState);
if (exceptionState.hadException()) {
requestCallback()->sendFailure("Could not open database.");
return;
@@ -510,9 +510,9 @@ public:
return;
}
- idbRequest = idbIndex->openCursor(context(), m_idbKeyRange.get(), blink::WebIDBCursor::Next);
+ idbRequest = idbIndex->openCursor(scriptState(), m_idbKeyRange.get(), blink::WebIDBCursor::Next);
} else {
- idbRequest = idbObjectStore->openCursor(context(), m_idbKeyRange.get(), blink::WebIDBCursor::Next);
+ idbRequest = idbObjectStore->openCursor(scriptState(), m_idbKeyRange.get(), blink::WebIDBCursor::Next);
}
idbRequest->addEventListener(EventTypeNames::success, openCursorCallback, false);
}
@@ -623,9 +623,10 @@ void InspectorIndexedDBAgent::requestDatabaseNames(ErrorString* errorString, con
if (!idbFactory)
return;
- ScriptState::Scope scope(ScriptState::forMainWorld(frame));
+ ScriptState* scriptState = ScriptState::forMainWorld(frame);
+ ScriptState::Scope scope(scriptState);
TrackExceptionState exceptionState;
- IDBRequest* idbRequest = idbFactory->getDatabaseNames(document, exceptionState);
+ IDBRequest* idbRequest = idbFactory->getDatabaseNames(scriptState, exceptionState);
if (exceptionState.hadException()) {
requestCallback->sendFailure("Could not obtain database names.");
return;
@@ -738,8 +739,7 @@ public:
}
TrackExceptionState exceptionState;
- // FXIME: Can we remove the local variable idbRequest?
- IDBRequest* idbRequest ALLOW_UNUSED = idbObjectStore->clear(context(), exceptionState);
+ idbObjectStore->clear(scriptState(), exceptionState);
ASSERT(!exceptionState.hadException());
if (exceptionState.hadException()) {
ExceptionCode ec = exceptionState.code();
« no previous file with comments | « Source/modules/indexeddb/IDBTransactionTest.cpp ('k') | Source/web/tests/CustomEventTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698