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

Unified Diff: Source/bindings/v8/ScriptValue.h

Issue 326853002: Revert of Add an ASSERT about cross-world wrapper leakage into ScriptValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/bindings/v8/ScriptPromiseTest.cpp ('k') | Source/bindings/v8/ScriptValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/bindings/v8/ScriptPromiseTest.cpp ('k') | Source/bindings/v8/ScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698