Adapt to API changes of Chromium and node.
This commit is contained in:
parent
58ccb27792
commit
cd4c5d976b
55 changed files with 281 additions and 402 deletions
|
@ -10,8 +10,9 @@
|
|||
|
||||
namespace {
|
||||
|
||||
v8::Handle<v8::Object> CreateObjectWithName(v8::Handle<v8::String> name) {
|
||||
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New();
|
||||
v8::Handle<v8::Object> CreateObjectWithName(v8::Isolate* isolate,
|
||||
v8::Handle<v8::String> name) {
|
||||
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate);
|
||||
t->SetClassName(name);
|
||||
return t->GetFunction()->NewInstance();
|
||||
}
|
||||
|
@ -31,14 +32,15 @@ int32_t GetObjectHash(v8::Handle<v8::Object> object) {
|
|||
return object->GetIdentityHash();
|
||||
}
|
||||
|
||||
void SetDestructor(v8::Handle<v8::Object> object,
|
||||
void SetDestructor(v8::Isolate* isolate,
|
||||
v8::Handle<v8::Object> object,
|
||||
v8::Handle<v8::Function> callback) {
|
||||
atom::ObjectLifeMonitor::BindTo(object, callback);
|
||||
atom::ObjectLifeMonitor::BindTo(isolate, object, callback);
|
||||
}
|
||||
|
||||
void TakeHeapSnapshot() {
|
||||
node::node_isolate->GetHeapProfiler()->TakeHeapSnapshot(
|
||||
v8::String::New("test"));
|
||||
void TakeHeapSnapshot(v8::Isolate* isolate) {
|
||||
isolate->GetHeapProfiler()->TakeHeapSnapshot(
|
||||
mate::StringToV8(isolate, "test"));
|
||||
}
|
||||
|
||||
void Initialize(v8::Handle<v8::Object> exports) {
|
||||
|
@ -53,4 +55,4 @@ void Initialize(v8::Handle<v8::Object> exports) {
|
|||
|
||||
} // namespace
|
||||
|
||||
NODE_MODULE(atom_common_v8_util, Initialize)
|
||||
NODE_MODULE_X(atom_common_v8_util, Initialize, NULL, NM_F_BUILTIN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue