Index: Source/bindings/v8/ScriptValue.h |
diff --git a/Source/bindings/v8/ScriptValue.h b/Source/bindings/v8/ScriptValue.h |
index 41c7684798752f59a80169aa8dfab9e0230f0261..41be6553d9e0ac9800184574158d91e2cbf5a884 100644 |
--- a/Source/bindings/v8/ScriptValue.h |
+++ b/Source/bindings/v8/ScriptValue.h |
@@ -57,7 +57,6 @@ |
, m_scriptState(scriptState) |
, m_value(value.IsEmpty() ? nullptr : SharedPersistent<v8::Value>::create(value, scriptState->isolate())) |
{ |
- ASSERT(isEmpty() || m_scriptState); |
} |
ScriptValue(const ScriptValue& value) |
@@ -65,7 +64,6 @@ |
, m_scriptState(value.m_scriptState) |
, m_value(value.m_value) |
{ |
- ASSERT(isEmpty() || m_scriptState); |
} |
ScriptState* scriptState() const |
@@ -146,7 +144,10 @@ |
m_value = nullptr; |
} |
- v8::Handle<v8::Value> v8Value() const; |
+ v8::Handle<v8::Value> v8Value() const |
+ { |
+ return m_value.get() ? m_value->newLocal(isolate()) : v8::Handle<v8::Value>(); |
+ } |
bool toString(String&) const; |
PassRefPtr<JSONValue> toJSONValue(ScriptState*) const; |