Sha256: 496ca1d4c0734e4fd6e4977cec105efb3c9f4657acb3c9f05aabca75c1d2823d

Contents?: true

Size: 707 Bytes

Versions: 2

Compression:

Stored size: 707 Bytes

Contents

#include "rr.h"

using namespace v8;

namespace {

  VALUE IsDead(VALUE self) {
    return rr_v82rb(V8::IsDead());
  }

  VALUE AdjustAmountOfExternalAllocatedMemory(VALUE self, VALUE bytes) {
    V8::AdjustAmountOfExternalAllocatedMemory(NUM2INT(bytes));
    return Qnil;
  }

   VALUE IdleNotification(VALUE self) {
     return rr_v82rb(V8::IdleNotification());
   }
}


void rr_init_v8_v8() {
  VALUE V8Module = rr_define_module("V8");
  rr_define_singleton_method(V8Module, "IsDead", IsDead, 0);
  rr_define_singleton_method(V8Module, "AdjustAmountOfExternalAllocatedMemory", AdjustAmountOfExternalAllocatedMemory, 1);
  rr_define_singleton_method(V8Module, "IdleNotification", IdleNotification, 0);
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
therubyracer-0.8.2 ext/v8/v8_v8.cpp
therubyracer-0.8.2.pre2 ext/v8/v8_v8.cpp