1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

make v8::Object::GetHiddenValue() scriptable from ruby

This commit is contained in:
Charles Lowell 2010-05-31 10:06:04 +03:00
parent 542f4ebde5
commit 19211179ef

View file

@ -63,6 +63,10 @@ namespace {
// 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() {
@ -72,6 +76,7 @@ void rr_init_obj() {
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);
}