ext/v8/context.cc in therubyracer-0.11.4 vs ext/v8/context.cc in therubyracer-0.12.0

- old
+ new

@@ -15,12 +15,12 @@ defineMethod("ReattachGlobal", &ReattachGlobal). defineMethod("SetSecurityToken", &SetSecurityToken). defineMethod("UseDefaultSecurityToken", &UseDefaultSecurityToken). defineMethod("GetSecurityToken", &GetSecurityToken). defineMethod("HasOutOfMemoryException", &HasOutOfMemoryException). - defineMethod("SetData", &SetData). - defineMethod("GetData", &GetData). + defineMethod("SetEmbedderData", &SetEmbedderData). + defineMethod("GetEmbedderData", &GetEmbedderData). defineMethod("AllowCodeGenerationFromStrings", &AllowCodeGenerationFromStrings). defineMethod("IsCodeGenerationFromStringsAllowed", &IsCodeGenerationFromStringsAllowed). defineMethod("Enter", &Enter). defineMethod("Exit", &Exit). store(&Class); @@ -75,15 +75,15 @@ VALUE Context::InContext(VALUE self) { return Bool(v8::Context::InContext()); } -VALUE Context::SetData(VALUE self, VALUE data) { - Void(Context(self)->SetData(String(data))); +VALUE Context::SetEmbedderData(VALUE self, VALUE index, VALUE data) { + Void(Context(self)->SetEmbedderData(NUM2INT(index), Value(data))); } -VALUE Context::GetData(VALUE self) { - return Value(Context(self)->GetData()); +VALUE Context::GetEmbedderData(VALUE self, VALUE index) { + Void(Context(self)->GetEmbedderData(NUM2INT(index))); } VALUE Context::AllowCodeGenerationFromStrings(VALUE self, VALUE allow) { Void(Context(self)->AllowCodeGenerationFromStrings(RTEST(allow))); }