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

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
Index: Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
diff --git a/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
index c7e3bef9c0b23d6b3cd35cad29873eb79b61cecb..6897cfb1e9df9df4a2822a910a58f8081409c8f9 100644
--- a/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
+++ b/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
@@ -192,7 +192,7 @@ void ExecutableWithDatabase::start(IDBFactory* idbFactory, SecurityOrigin*, cons
{
RefPtr<OpenDatabaseCallback> callback = OpenDatabaseCallback::create(this);
TrackExceptionState exceptionState;
- RefPtrWillBeRawPtr<IDBOpenDBRequest> idbOpenDBRequest = idbFactory->open(context(), databaseName, exceptionState);
+ RefPtrWillBeRawPtr<IDBOpenDBRequest> idbOpenDBRequest = idbFactory->open(scriptState(), databaseName, exceptionState);
if (exceptionState.hadException()) {
requestCallback()->sendFailure("Could not open database.");
return;
@@ -513,9 +513,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);
}
@@ -626,9 +626,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;
- RefPtrWillBeRawPtr<IDBRequest> idbRequest = idbFactory->getDatabaseNames(document, exceptionState);
+ RefPtrWillBeRawPtr<IDBRequest> idbRequest = idbFactory->getDatabaseNames(scriptState, exceptionState);
if (exceptionState.hadException()) {
requestCallback->sendFailure("Could not obtain database names.");
return;
@@ -743,7 +744,7 @@ public:
TrackExceptionState exceptionState;
// FXIME: Can we remove the local variable idbRequest?
- RefPtrWillBeRawPtr<IDBRequest> idbRequest = idbObjectStore->clear(context(), exceptionState);
+ RefPtrWillBeRawPtr<IDBRequest> idbRequest = idbObjectStore->clear(scriptState(), exceptionState);
ASSERT(!exceptionState.hadException());
if (exceptionState.hadException()) {
ExceptionCode ec = exceptionState.code();

Powered by Google App Engine
This is Rietveld 408576698