| Index: src/api.cc
|
| ===================================================================
|
| --- src/api.cc (revision 12669)
|
| +++ src/api.cc (working copy)
|
| @@ -792,6 +792,29 @@
|
| }
|
|
|
|
|
| +void Context::SetEmbedderData(void* ptr) {
|
| + i::Handle<i::Context> env = Utils::OpenHandle(this);
|
| + i::Isolate* isolate = env->GetIsolate();
|
| + if (IsDeadCheck(isolate, "v8::Context::SetEmbedderData()")) return;
|
| + Local<Value> data = External::Wrap(ptr);
|
| + i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
|
| + ASSERT(env->IsNativeContext());
|
| + env->set_embedder_data(*raw_data);
|
| +}
|
| +
|
| +
|
| +void* Context::GetEmbedderData() {
|
| + i::Handle<i::Context> env = Utils::OpenHandle(this);
|
| + i::Isolate* isolate = env->GetIsolate();
|
| + if (IsDeadCheck(isolate, "v8::Context::GetEmbedderData()")) {
|
| + return 0;
|
| + }
|
| + i::Handle<i::Object> result(env->embedder_data(), isolate);
|
| + Local<Value> data = Utils::ToLocal(result);
|
| + return External::Unwrap(data);
|
| +}
|
| +
|
| +
|
| i::Object** v8::HandleScope::RawClose(i::Object** value) {
|
| if (!ApiCheck(!is_closed_,
|
| "v8::HandleScope::Close()",
|
|
|