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

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

Issue 23450039: Pass isolate to ScriptValue constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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/ScriptString.h ('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 dc5e498f51892b51f9e8f9c6b7390e1f7df555a5..dc12b8b94cd865179b11fb149472084e9609f6ba 100644
--- a/Source/bindings/v8/ScriptValue.h
+++ b/Source/bindings/v8/ScriptValue.h
@@ -60,8 +60,8 @@ public:
ScriptValue() { }
virtual ~ScriptValue();
- ScriptValue(v8::Handle<v8::Value> value)
- : m_value(value.IsEmpty() ? 0 : SharedPersistent<v8::Value>::create(value, v8::Isolate::GetCurrent()))
+ ScriptValue(v8::Handle<v8::Value> value, v8::Isolate* isolate)
+ : m_value(value.IsEmpty() ? 0 : SharedPersistent<v8::Value>::create(value, isolate))
{
}
@@ -70,8 +70,16 @@ public:
{
}
- static ScriptValue createNull() { return ScriptValue(v8::Null()); }
- static ScriptValue createBoolean(bool b) { return ScriptValue(b ? v8::True() : v8::False()); }
+ static ScriptValue createNull()
+ {
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ return ScriptValue(v8::Null(isolate), isolate);
+ }
+ static ScriptValue createBoolean(bool b)
+ {
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ return ScriptValue(b ? v8::True(isolate) : v8::False(isolate), isolate);
+ }
ScriptValue& operator=(const ScriptValue& value)
{
« no previous file with comments | « Source/bindings/v8/ScriptString.h ('k') | Source/bindings/v8/ScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698