| Index: Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
|
| ===================================================================
|
| --- Source/WebCore/bindings/v8/IDBBindingUtilities.cpp (revision 132933)
|
| +++ Source/WebCore/bindings/v8/IDBBindingUtilities.cpp (working copy)
|
| @@ -179,10 +179,9 @@
|
| IDBKeyPathParseError error;
|
| IDBParseKeyPath(keyPath, keyPathElements, error);
|
| ASSERT(error == IDBKeyPathParseErrorNone);
|
| + ASSERT(v8::Context::InContext());
|
|
|
| v8::HandleScope handleScope;
|
| - v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
|
| -
|
| v8::Handle<v8::Value> v8Value(value.v8Value());
|
| v8::Handle<v8::Value> v8Key(getNthValueOnKeyPath(v8Value, keyPathElements, keyPathElements.size()));
|
| if (v8Key.IsEmpty())
|
| @@ -194,8 +193,10 @@
|
| {
|
| IDB_TRACE("createIDBKeyFromScriptValueAndKeyPath");
|
| ASSERT(!keyPath.isNull());
|
| + ASSERT(v8::Context::InContext());
|
|
|
| - v8::HandleScope scope;
|
| +
|
| + v8::HandleScope handleScope;
|
| if (keyPath.type() == IDBKeyPath::ArrayType) {
|
| IDBKey::KeyArray result;
|
| const Vector<String>& array = keyPath.array();
|
| @@ -212,11 +213,10 @@
|
| return createIDBKeyFromScriptValueAndKeyPath(value, keyPath.string());
|
| }
|
|
|
| -// FIXME: The only reason this exists is because we need a v8::Context and scope inside a timer. Is there a better / more general way to do this?
|
| ScriptValue deserializeIDBValue(ScriptExecutionContext* scriptContext, PassRefPtr<SerializedScriptValue> prpValue)
|
| {
|
| + ASSERT(v8::Context::InContext());
|
| v8::HandleScope handleScope;
|
| - v8::Context::Scope contextScope(toV8Context(scriptContext, UseCurrentWorld));
|
| RefPtr<SerializedScriptValue> serializedValue = prpValue;
|
| if (serializedValue)
|
| return ScriptValue(serializedValue->deserialize());
|
| @@ -226,6 +226,7 @@
|
| bool injectIDBKeyIntoScriptValue(PassRefPtr<IDBKey> key, ScriptValue& value, const IDBKeyPath& keyPath)
|
| {
|
| IDB_TRACE("injectIDBKeyIntoScriptValue");
|
| + ASSERT(v8::Context::InContext());
|
|
|
| ASSERT(keyPath.type() == IDBKeyPath::StringType);
|
| Vector<String> keyPathElements;
|
| @@ -237,8 +238,6 @@
|
| return 0;
|
|
|
| v8::HandleScope handleScope;
|
| - v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
|
| -
|
| v8::Handle<v8::Value> v8Value(value.v8Value());
|
| v8::Handle<v8::Value> parent(ensureNthValueOnKeyPath(v8Value, keyPathElements, keyPathElements.size() - 1));
|
| if (parent.IsEmpty())
|
| @@ -268,9 +267,8 @@
|
|
|
| ScriptValue idbKeyToScriptValue(ScriptExecutionContext* scriptContext, PassRefPtr<IDBKey> key)
|
| {
|
| + ASSERT(v8::Context::InContext());
|
| v8::HandleScope handleScope;
|
| - v8::Context::Scope contextScope(toV8Context(scriptContext, UseCurrentWorld));
|
| -
|
| v8::Handle<v8::Value> v8Value(toV8(key.get()));
|
| return ScriptValue(v8Value);
|
| }
|
|
|