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