ext/v8/v8_obj.cpp in therubyracer-0.7.0 vs ext/v8/v8_obj.cpp in therubyracer-0.7.1.pre
- old
+ new
@@ -61,18 +61,23 @@
}
//TODO: need to store a reference here? what's the best way
// rr_v8_ref_setref(self, "RubyPeer", )
return Qnil;
}
+ VALUE GetHiddenValue(VALUE self, VALUE key) {
+ HandleScope scope;
+ return rr_v82rb(unwrap(self)->GetHiddenValue(rr_rb2v8(key)->ToString()));
+ }
}
void rr_init_obj() {
rr_cV8_C_Object = rr_define_class("Object", rr_cV8_C_Value);
rb_define_attr(rr_cV8_C_Object, "context", 1, 0);
rr_define_singleton_method(rr_cV8_C_Object, "New", New, 0);
rr_define_method(rr_cV8_C_Object, "Get", Get, 1);
rr_define_method(rr_cV8_C_Object, "Set", Set, 2);
rr_define_method(rr_cV8_C_Object, "GetPropertyNames", GetPropertyNames, 0);
+ rr_define_method(rr_cV8_C_Object, "GetHiddenValue", GetHiddenValue, 1);
rr_define_method(rr_cV8_C_Object, "SetHiddenValue", SetHiddenValue, 2);
}
VALUE rr_reflect_v8_object(Handle<Value> value) {
Local<Object> object(Object::Cast(*value));