mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
expose reflect rr_v8_object_as() so that other objects can use it.
This commit is contained in:
parent
36014c2ff5
commit
25744dffbf
3 changed files with 5 additions and 5 deletions
|
@ -64,6 +64,5 @@ void rr_init_function() {
|
|||
}
|
||||
|
||||
VALUE rr_reflect_v8_function(Handle<Value> value) {
|
||||
Local<Function> function(Function::Cast(*value));
|
||||
return rr_v8_handle_new(FunctionClass, function);
|
||||
return rr_reflect_v8_object_as(value, FunctionClass);
|
||||
}
|
||||
|
|
|
@ -92,7 +92,8 @@ void rr_init_object() {
|
|||
rr_define_method(ObjectClass, "SetPrototype", SetPrototype, 1);
|
||||
}
|
||||
|
||||
VALUE rr_reflect_v8_object_as(Handle<Object> object, VALUE ruby_class) {
|
||||
VALUE rr_reflect_v8_object_as(Handle<Value> value, VALUE ruby_class) {
|
||||
Handle<Object> object = Handle<Object>::Cast(value);
|
||||
VALUE handle;
|
||||
v8_weakref* backref;
|
||||
Local<Value> holder = object->GetHiddenValue(String::NewSymbol("TheRubyRacer::Backref"));
|
||||
|
@ -112,6 +113,6 @@ VALUE rr_reflect_v8_object_as(Handle<Object> object, VALUE ruby_class) {
|
|||
}
|
||||
|
||||
VALUE rr_reflect_v8_object(Handle<Value> value) {
|
||||
return rr_reflect_v8_object_as(value->ToObject(), ObjectClass);
|
||||
return rr_reflect_v8_object_as(value, ObjectClass);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
void rr_init_object();
|
||||
VALUE rr_v8_object_class();
|
||||
VALUE rr_reflect_v8_object(v8::Handle<v8::Value> value);
|
||||
|
||||
VALUE rr_reflect_v8_object_as(v8::Handle<v8::Value> object, VALUE ruby_class);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue