mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
Context isa Handle
This commit is contained in:
parent
7ede61886f
commit
314817fbea
3 changed files with 6 additions and 1 deletions
|
@ -78,7 +78,7 @@ namespace {
|
|||
}
|
||||
|
||||
void rr_init_context() {
|
||||
ContextClass = rr_define_class("Context");
|
||||
ContextClass = rr_define_class("Context", rr_v8_handle_class());
|
||||
rr_define_singleton_method(ContextClass, "New", New, -1);
|
||||
rr_define_singleton_method(ContextClass, "InContext", InContext, 0);
|
||||
rr_define_singleton_method(ContextClass, "GetEntered", GetEntered, 0);
|
||||
|
|
|
@ -78,3 +78,7 @@ VALUE rr_v8_handle_new(VALUE klass, v8::Handle<void> handle) {
|
|||
return Data_Wrap_Struct(klass, gc_mark, gc_free, new v8_handle(handle));
|
||||
}
|
||||
|
||||
VALUE rr_v8_handle_class() {
|
||||
return rr_define_class("Handle");
|
||||
}
|
||||
|
||||
|
|
|
@ -18,5 +18,6 @@ template <class T> v8::Persistent<T>& rr_v8_handle(VALUE value) {
|
|||
return (v8::Persistent<T>&)handle->handle;
|
||||
}
|
||||
VALUE rr_v8_handle_new(VALUE rbclass, v8::Handle<void> handle);
|
||||
VALUE rr_v8_handle_class();
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue