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

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

Issue 236783002: Pass NewScriptState to idbAnyToScriptValue() and idbKeyToScriptValue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/IDBCursor.h ('k') | Source/modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBCursor.cpp
diff --git a/Source/modules/indexeddb/IDBCursor.cpp b/Source/modules/indexeddb/IDBCursor.cpp
index b82a9fdb2fd0a6de160f28c70f468eb97c852a52..faf8d1b908d7b2720a8469cd5d8593ed9c1ff217 100644
--- a/Source/modules/indexeddb/IDBCursor.cpp
+++ b/Source/modules/indexeddb/IDBCursor.cpp
@@ -309,31 +309,29 @@ void IDBCursor::checkForReferenceCycle()
m_request.clear();
}
-ScriptValue IDBCursor::key(ExecutionContext* context)
+ScriptValue IDBCursor::key(NewScriptState* scriptState)
{
m_keyDirty = false;
- DOMRequestState requestState(toIsolate(context));
- return idbKeyToScriptValue(&requestState, m_key);
+ return idbKeyToScriptValue(scriptState, m_key);
}
-ScriptValue IDBCursor::primaryKey(ExecutionContext* context)
+ScriptValue IDBCursor::primaryKey(NewScriptState* scriptState)
{
m_primaryKeyDirty = false;
- DOMRequestState requestState(toIsolate(context));
- return idbKeyToScriptValue(&requestState, m_primaryKey);
+ return idbKeyToScriptValue(scriptState, m_primaryKey);
}
-ScriptValue IDBCursor::value(ExecutionContext* context)
+ScriptValue IDBCursor::value(NewScriptState* scriptState)
{
ASSERT(isCursorWithValue());
- DOMRequestState requestState(toIsolate(context));
RefPtr<IDBObjectStore> objectStore = effectiveObjectStore();
const IDBObjectStoreMetadata& metadata = objectStore->metadata();
RefPtr<IDBAny> value;
if (metadata.autoIncrement && !metadata.keyPath.isNull()) {
value = IDBAny::create(m_value, m_primaryKey, metadata.keyPath);
#ifndef NDEBUG
+ DOMRequestState requestState(scriptState->isolate());
assertPrimaryKeyValidOrInjectable(&requestState, m_value, m_primaryKey, metadata.keyPath);
#endif
} else {
@@ -341,13 +339,12 @@ ScriptValue IDBCursor::value(ExecutionContext* context)
}
m_valueDirty = false;
- return idbAnyToScriptValue(&requestState, value);
+ return idbAnyToScriptValue(scriptState, value);
}
-ScriptValue IDBCursor::source(ExecutionContext* context) const
+ScriptValue IDBCursor::source(NewScriptState* scriptState) const
{
- DOMRequestState requestState(toIsolate(context));
- return idbAnyToScriptValue(&requestState, m_source);
+ return idbAnyToScriptValue(scriptState, m_source);
}
void IDBCursor::setValueReady(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer> value)
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.h ('k') | Source/modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698