mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
make compatible with v8 3.15.11
This commit is contained in:
parent
4c25753cc9
commit
e0852e8963
5 changed files with 14 additions and 13 deletions
|
@ -32,7 +32,7 @@ namespace rr {
|
|||
}
|
||||
|
||||
v8::Handle<v8::Value> Backref::toExternal() {
|
||||
v8::Local<v8::Value> wrapper = v8::External::Wrap(this);
|
||||
v8::Local<v8::Value> wrapper = v8::External::New(this);
|
||||
v8::Persistent<v8::Value>::New(wrapper).MakeWeak(this, &release);
|
||||
return wrapper;
|
||||
}
|
||||
|
@ -42,4 +42,4 @@ namespace rr {
|
|||
Backref* backref = (Backref*)data;
|
||||
delete backref;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@ void Context::Init() {
|
|||
defineMethod("UseDefaultSecurityToken", &UseDefaultSecurityToken).
|
||||
defineMethod("GetSecurityToken", &GetSecurityToken).
|
||||
defineMethod("HasOutOfMemoryException", &HasOutOfMemoryException).
|
||||
defineMethod("SetData", &SetData).
|
||||
defineMethod("GetData", &GetData).
|
||||
defineMethod("SetEmbedderData", &SetEmbedderData).
|
||||
defineMethod("GetEmbedderData", &GetEmbedderData).
|
||||
defineMethod("AllowCodeGenerationFromStrings", &AllowCodeGenerationFromStrings).
|
||||
defineMethod("IsCodeGenerationFromStringsAllowed", &IsCodeGenerationFromStringsAllowed).
|
||||
defineMethod("Enter", &Enter).
|
||||
|
@ -77,12 +77,12 @@ VALUE Context::InContext(VALUE self) {
|
|||
return Bool(v8::Context::InContext());
|
||||
}
|
||||
|
||||
VALUE Context::SetData(VALUE self, VALUE data) {
|
||||
Void(Context(self)->SetData(String(data)));
|
||||
VALUE Context::SetEmbedderData(VALUE self, VALUE index, VALUE data) {
|
||||
Void(Context(self)->SetEmbedderData(NUM2INT(index), Value(data)));
|
||||
}
|
||||
|
||||
VALUE Context::GetData(VALUE self) {
|
||||
return Value(Context(self)->GetData());
|
||||
VALUE Context::GetEmbedderData(VALUE self, VALUE index) {
|
||||
Void(Context(self)->GetEmbedderData(NUM2INT(index)));
|
||||
}
|
||||
|
||||
VALUE Context::AllowCodeGenerationFromStrings(VALUE self, VALUE allow) {
|
||||
|
|
|
@ -144,7 +144,8 @@ Object::operator VALUE() {
|
|||
backref = new Backref(value);
|
||||
handle->SetHiddenValue(key, backref->toExternal());
|
||||
} else {
|
||||
backref = (Backref*)v8::External::Unwrap(external);
|
||||
v8::Local<v8::External> wrapper = v8::External::Cast(*external);
|
||||
backref = (Backref*)wrapper->Value();
|
||||
value = backref->get();
|
||||
if (!RTEST(value)) {
|
||||
value = downcast();
|
||||
|
@ -331,4 +332,4 @@ VALUE Object::CallAsConstructor(VALUE self, VALUE argv) {
|
|||
return Value(Object(self)->CallAsConstructor(RARRAY_LENINT(argv), Value::array<Value>(argv)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,8 +319,8 @@ public:
|
|||
static VALUE GetSecurityToken(VALUE self);
|
||||
static VALUE HasOutOfMemoryException(VALUE self);
|
||||
static VALUE InContext(VALUE self);
|
||||
static VALUE SetData(VALUE self, VALUE data);
|
||||
static VALUE GetData(VALUE self);
|
||||
static VALUE SetEmbedderData(VALUE self, VALUE index, VALUE data);
|
||||
static VALUE GetEmbedderData(VALUE self, VALUE index);
|
||||
static VALUE AllowCodeGenerationFromStrings(VALUE self, VALUE allow);
|
||||
static VALUE IsCodeGenerationFromStringsAllowed(VALUE self);
|
||||
|
||||
|
|
|
@ -17,5 +17,5 @@ Gem::Specification.new do |gem|
|
|||
gem.version = V8::VERSION
|
||||
|
||||
gem.add_dependency 'ref'
|
||||
gem.add_dependency 'libv8', '~> 3.11.8.5'
|
||||
gem.add_dependency 'libv8', '~> 3.15.11.0'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue