| Index: Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
|
| diff --git a/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
|
| index d3613dc8b1ec3287d12e3c934f914225c563fb04..5bae8c6f7781a6cbfd9b4d594b489e132cdedbda 100644
|
| --- a/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
|
| +++ b/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
|
| @@ -449,9 +449,12 @@ public:
|
| // FIXME: There are no tests for this error showing when a recursive
|
| // object is inspected.
|
| const String errorMessage("\"Inspection error. Maximum depth reached?\"");
|
| - RefPtr<JSONValue> keyJsonValue = idbCursor->key(m_scriptState.get()).toJSONValue(m_scriptState.get());
|
| - RefPtr<JSONValue> primaryKeyJsonValue = idbCursor->primaryKey(m_scriptState.get()).toJSONValue(m_scriptState.get());
|
| - RefPtr<JSONValue> valueJsonValue = idbCursor->value(m_scriptState.get()).toJSONValue(m_scriptState.get());
|
| + ScriptState* scriptState = m_scriptState.get();
|
| + v8::Isolate* isolate = scriptState->isolate();
|
| + ScriptState::Scope scope(scriptState);
|
| + RefPtr<JSONValue> keyJsonValue = ScriptValue::to<JSONValuePtr>(isolate, idbCursor->key(scriptState), exceptionState);
|
| + RefPtr<JSONValue> primaryKeyJsonValue = ScriptValue::to<JSONValuePtr>(isolate, idbCursor->primaryKey(scriptState), exceptionState);
|
| + RefPtr<JSONValue> valueJsonValue = ScriptValue::to<JSONValuePtr>(isolate, idbCursor->value(scriptState), exceptionState);
|
| String key = keyJsonValue ? keyJsonValue->toJSONString() : errorMessage;
|
| String value = valueJsonValue ? valueJsonValue->toJSONString() : errorMessage;
|
| String primaryKey = primaryKeyJsonValue ? primaryKeyJsonValue->toJSONString() : errorMessage;
|
|
|