Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsValue.cpp

Issue 6112412478472192: Issue 1547 - Pass isolate to v8::API (Closed)
Patch Set: remove new empty lines Created Feb. 9, 2015, 11:02 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/JsEngine.cpp ('k') | src/Utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsValue.cpp
diff --git a/src/JsValue.cpp b/src/JsValue.cpp
index e3353a389d53ec2073df9c2e9f4310cb5d4b5ebb..77a005ba51f0bcd5647f2942730c1b8cc74372b0 100644
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -146,7 +146,7 @@ AdblockPlus::JsValuePtr AdblockPlus::JsValue::GetProperty(const std::string& nam
throw new std::runtime_error("Attempting to get property of a non-object");
const JsContext context(jsEngine);
- v8::Local<v8::String> property = Utils::ToV8String(name);
+ v8::Local<v8::String> property = Utils::ToV8String(jsEngine->isolate, name);
v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(UnwrapValue());
return JsValuePtr(new JsValue(jsEngine, obj->Get(property)));
}
@@ -156,7 +156,7 @@ void AdblockPlus::JsValue::SetProperty(const std::string& name, v8::Handle<v8::V
if (!IsObject())
throw new std::runtime_error("Attempting to set property on a non-object");
- v8::Local<v8::String> property = Utils::ToV8String(name);
+ v8::Local<v8::String> property = Utils::ToV8String(jsEngine->isolate, name);
v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(UnwrapValue());
obj->Set(property, val);
}
@@ -169,13 +169,13 @@ v8::Local<v8::Value> AdblockPlus::JsValue::UnwrapValue() const
void AdblockPlus::JsValue::SetProperty(const std::string& name, const std::string& val)
{
const JsContext context(jsEngine);
- SetProperty(name, Utils::ToV8String(val));
+ SetProperty(name, Utils::ToV8String(jsEngine->isolate, val));
}
void AdblockPlus::JsValue::SetProperty(const std::string& name, int64_t val)
{
const JsContext context(jsEngine);
- SetProperty(name, v8::Number::New(val));
+ SetProperty(name, v8::Number::New(jsEngine->isolate, val));
}
void AdblockPlus::JsValue::SetProperty(const std::string& name, const JsValuePtr& val)
« no previous file with comments | « src/JsEngine.cpp ('k') | src/Utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld