aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/SkV8Example/JsContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/SkV8Example/JsContext.cpp')
-rw-r--r--experimental/SkV8Example/JsContext.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/experimental/SkV8Example/JsContext.cpp b/experimental/SkV8Example/JsContext.cpp
index cb25daefe0..5778172f27 100644
--- a/experimental/SkV8Example/JsContext.cpp
+++ b/experimental/SkV8Example/JsContext.cpp
@@ -208,7 +208,8 @@ void JsContext::GetWidth(Local<String> name,
JsContext* jsContext = Unwrap(info.This());
SkISize size = jsContext->fCanvas->getDeviceSize();
- info.GetReturnValue().Set(Int32::New(size.fWidth));
+ info.GetReturnValue().Set(
+ Int32::New(jsContext->fGlobal->getIsolate(), size.fWidth));
}
void JsContext::GetHeight(Local<String> name,
@@ -216,7 +217,8 @@ void JsContext::GetHeight(Local<String> name,
JsContext* jsContext = Unwrap(info.This());
SkISize size = jsContext->fCanvas->getDeviceSize();
- info.GetReturnValue().Set(Int32::New(size.fHeight));
+ info.GetReturnValue().Set(
+ Int32::New(jsContext->fGlobal->getIsolate(), size.fHeight));
}
@@ -226,7 +228,7 @@ Persistent<ObjectTemplate> JsContext::gContextTemplate;
result->Set(String::NewFromUtf8( \
fGlobal->getIsolate(), name, \
String::kInternalizedString), \
- FunctionTemplate::New(fn))
+ FunctionTemplate::New(fGlobal->getIsolate(), fn))
Handle<ObjectTemplate> JsContext::makeContextTemplate() {
EscapableHandleScope handleScope(fGlobal->getIsolate());