Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 8b323b2f1fb7264f3b8da49cf1c491ec33c06742..df8fa14e4fd40a44ff0ef7a6d213ef5617046db4 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -763,7 +763,7 @@ void Context::Exit() { |
} |
-void Context::SetData(v8::Handle<String> data) { |
+void Context::SetData(v8::Handle<Value> data) { |
i::Handle<i::Context> env = Utils::OpenHandle(this); |
i::Isolate* isolate = env->GetIsolate(); |
if (IsDeadCheck(isolate, "v8::Context::SetData()")) return; |
@@ -779,16 +779,13 @@ v8::Local<v8::Value> Context::GetData() { |
i::Handle<i::Context> env = Utils::OpenHandle(this); |
i::Isolate* isolate = env->GetIsolate(); |
if (IsDeadCheck(isolate, "v8::Context::GetData()")) { |
- return v8::Local<Value>(); |
+ return Local<Value>(); |
} |
- i::Object* raw_result = NULL; |
ASSERT(env->IsNativeContext()); |
- if (env->IsNativeContext()) { |
- raw_result = env->data(); |
- } else { |
+ if (!env->IsNativeContext()) { |
Sven Panne
2012/09/13 07:39:28
I see that this has been here before, but it looks
danno
2012/09/14 13:15:14
It's probably outside of the scope of this CL to f
|
return Local<Value>(); |
} |
- i::Handle<i::Object> result(raw_result, isolate); |
+ i::Handle<i::Object> result(env->data(), isolate); |
return Utils::ToLocal(result); |
} |