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

Unified Diff: Source/modules/indexeddb/IDBRequest.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/IDBRequest.cpp
diff --git a/Source/modules/indexeddb/IDBRequest.cpp b/Source/modules/indexeddb/IDBRequest.cpp
index 36858b95f35a1803c21e2fe4344cbc5815dfc3e9..1f07f799e363e2461f2b1676369098be4e81e3eb 100644
--- a/Source/modules/indexeddb/IDBRequest.cpp
+++ b/Source/modules/indexeddb/IDBRequest.cpp
@@ -45,9 +45,9 @@ using blink::WebIDBCursor;
namespace WebCore {
-PassRefPtrWillBeRawPtr<IDBRequest> IDBRequest::create(ExecutionContext* context, PassRefPtrWillBeRawPtr<IDBAny> source, IDBTransaction* transaction)
+PassRefPtrWillBeRawPtr<IDBRequest> IDBRequest::create(ScriptState* scriptState, PassRefPtrWillBeRawPtr<IDBAny> source, IDBTransaction* transaction)
{
- RefPtrWillBeRawPtr<IDBRequest> request(adoptRefWillBeRefCountedGarbageCollected(new IDBRequest(context, source, transaction)));
+ RefPtrWillBeRawPtr<IDBRequest> request(adoptRefWillBeRefCountedGarbageCollected(new IDBRequest(scriptState, source, transaction)));
request->suspendIfNeeded();
// Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames) are not associated with transactions.
if (transaction)
@@ -55,13 +55,13 @@ PassRefPtrWillBeRawPtr<IDBRequest> IDBRequest::create(ExecutionContext* context,
return request.release();
}
-IDBRequest::IDBRequest(ExecutionContext* context, PassRefPtrWillBeRawPtr<IDBAny> source, IDBTransaction* transaction)
- : ActiveDOMObject(context)
+IDBRequest::IDBRequest(ScriptState* scriptState, PassRefPtrWillBeRawPtr<IDBAny> source, IDBTransaction* transaction)
+ : ActiveDOMObject(scriptState->executionContext())
, m_contextStopped(false)
, m_transaction(transaction)
, m_readyState(PENDING)
, m_requestAborted(false)
- , m_scriptState(ScriptState::current(toIsolate(context)))
+ , m_scriptState(scriptState)
, m_source(source)
, m_hasPendingActivity(true)
, m_cursorType(IndexedDB::CursorKeyAndValue)

Powered by Google App Engine
This is Rietveld 408576698