mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
v8 classes now extend from the handle class.
This commit is contained in:
parent
3879db8769
commit
d2f1dcd042
5 changed files with 6 additions and 6 deletions
|
@ -106,13 +106,13 @@ void rr_init_v8_exception() {
|
|||
rr_define_singleton_method(ExceptionClass, "SyntaxError", SyntaxError, 1);
|
||||
rr_define_singleton_method(ExceptionClass, "Error", Error, 1);
|
||||
|
||||
StackTraceClass = rr_define_class("StackTrace");
|
||||
StackTraceClass = rr_define_class("StackTrace", rr_v8_handle_class());
|
||||
rr_define_singleton_method(StackTraceClass, "CurrentStackTrace", Trace::CurrentStackTrace, 1);
|
||||
rr_define_method(StackTraceClass, "GetFrame", Trace::GetFrame, 1);
|
||||
rr_define_method(StackTraceClass, "GetFrameCount", Trace::GetFrameCount, 0);
|
||||
rr_define_method(StackTraceClass, "AsArray", Trace::AsArray, 0);
|
||||
|
||||
StackFrameClass = rr_define_class("StackFrame");
|
||||
StackFrameClass = rr_define_class("StackFrame", rr_v8_handle_class());
|
||||
rr_define_method(StackFrameClass, "GetLineNumber", Frame::GetLineNumber, 0);
|
||||
rr_define_method(StackFrameClass, "GetColumn", Frame::GetColumn, 0);
|
||||
rr_define_method(StackFrameClass, "GetScriptName", Frame::GetScriptName, 0);
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace {
|
|||
}
|
||||
|
||||
void rr_init_message() {
|
||||
MessageClass = rr_define_class("Message");
|
||||
MessageClass = rr_define_class("Message", rr_v8_handle_class());
|
||||
rr_define_method(MessageClass, "Get", Get, 0);
|
||||
rr_define_method(MessageClass, "GetSourceLine", GetSourceLine, 0);
|
||||
rr_define_method(MessageClass, "GetScriptResourceName", GetScriptResourceName, 0);
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace {
|
|||
}
|
||||
|
||||
void rr_init_script() {
|
||||
VALUE ScriptClass = rr_define_class("Script");
|
||||
VALUE ScriptClass = rr_define_class("Script", rr_v8_handle_class());
|
||||
rr_define_singleton_method(ScriptClass, "New", New, 2);
|
||||
rr_define_singleton_method(ScriptClass, "Compile", Compile, 2);
|
||||
rr_define_method(ScriptClass, "Run", Run, 0);
|
||||
|
|
|
@ -311,7 +311,7 @@ namespace {
|
|||
}
|
||||
|
||||
void rr_init_template() {
|
||||
VALUE Template = rr_define_class("Template");
|
||||
VALUE Template = rr_define_class("Template", rr_v8_handle_class());
|
||||
rr_define_method(Template, "Set", Set, 2);
|
||||
|
||||
ObjectTemplateClass = rr_define_class("ObjectTemplate", Template);
|
||||
|
|
|
@ -135,7 +135,7 @@ VALUE rr_v8_value_empty() {
|
|||
}
|
||||
|
||||
void rr_init_value() {
|
||||
ValueClass = rr_define_class("Value");
|
||||
ValueClass = rr_define_class("Value", rr_v8_handle_class());
|
||||
rr_define_const("Empty", rr_v8_handle_new(ValueClass, Handle<Value>()));
|
||||
|
||||
rr_define_method(ValueClass, "IsEmpty", IsEmpty, 0);
|
||||
|
|
Loading…
Reference in a new issue