mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
allow passing a hint to IdleNotification()
This commit is contained in:
parent
f1a1571370
commit
b54dc3e3c4
2 changed files with 9 additions and 3 deletions
|
@ -678,7 +678,7 @@ public:
|
|||
class V8 {
|
||||
public:
|
||||
static void Init();
|
||||
static VALUE IdleNotification(VALUE self);
|
||||
static VALUE IdleNotification(int argc, VALUE argv[], VALUE self);
|
||||
static VALUE SetCaptureStackTraceForUncaughtExceptions(int argc, VALUE argv[], VALUE self);
|
||||
};
|
||||
|
||||
|
|
10
ext/v8/v8.cc
10
ext/v8/v8.cc
|
@ -8,8 +8,14 @@ void V8::Init() {
|
|||
defineSingletonMethod("SetCaptureStackTraceForUncaughtExceptions", &SetCaptureStackTraceForUncaughtExceptions);
|
||||
}
|
||||
|
||||
VALUE V8::IdleNotification(VALUE self) {
|
||||
return Bool(v8::V8::IdleNotification());
|
||||
VALUE V8::IdleNotification(int argc, VALUE argv[], VALUE self) {
|
||||
VALUE hint;
|
||||
rb_scan_args(argc, argv, "01", &hint);
|
||||
if (RTEST(hint)) {
|
||||
return Bool(v8::V8::IdleNotification(NUM2INT(hint)));
|
||||
} else {
|
||||
return Bool(v8::V8::IdleNotification());
|
||||
}
|
||||
}
|
||||
|
||||
VALUE V8::SetCaptureStackTraceForUncaughtExceptions(int argc, VALUE argv[], VALUE self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue