Skip to content

Commit

Permalink
src: remove non-isolate PersistentToLocal(), v2
Browse files Browse the repository at this point in the history
Commit 78d9094 updated src/*.cc to use the version of PersistentToLocal
that takes a v8::Isolate* as its first argument. This commit removes
the non-isolate version.
  • Loading branch information
bnoordhuis committed Aug 2, 2013
1 parent c80f8fa commit 350fc80
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/node_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@ inline MUST_USE_RESULT bool ParseArrayIndex(v8::Handle<v8::Value> arg,
return true;
}

template <class TypeName>
inline v8::Local<TypeName> PersistentToLocal(
const v8::Persistent<TypeName>& persistent) {
return PersistentToLocal(node_isolate, persistent);
}

template <class TypeName>
inline v8::Local<TypeName> PersistentToLocal(
v8::Isolate* isolate,
Expand All @@ -269,7 +263,7 @@ CachedBase<TypeName>::CachedBase() {

template <typename TypeName>
CachedBase<TypeName>::operator v8::Handle<TypeName>() const {
return PersistentToLocal(handle_);
return PersistentToLocal(node_isolate, handle_);
}

template <typename TypeName>
Expand Down Expand Up @@ -307,7 +301,7 @@ v8::Handle<v8::Value> MakeCallback(
const TypeName method,
int argc,
v8::Handle<v8::Value>* argv) {
v8::Local<v8::Object> recv_obj = PersistentToLocal(recv);
v8::Local<v8::Object> recv_obj = PersistentToLocal(node_isolate, recv);
return MakeCallback(recv_obj, method, argc, argv);
}

Expand All @@ -325,15 +319,16 @@ inline bool HasInstance(
const v8::Persistent<v8::FunctionTemplate>& function_template,
v8::Handle<v8::Value> value) {
v8::Local<v8::FunctionTemplate> function_template_handle =
PersistentToLocal(function_template);
PersistentToLocal(node_isolate, function_template);
return function_template_handle->HasInstance(value);
}

inline v8::Local<v8::Object> NewInstance(
const v8::Persistent<v8::Function>& ctor,
int argc,
v8::Handle<v8::Value>* argv) {
v8::Local<v8::Function> constructor_handle = PersistentToLocal(ctor);
v8::Local<v8::Function> constructor_handle =
PersistentToLocal(node_isolate, ctor);
return constructor_handle->NewInstance(argc, argv);
}

Expand Down

0 comments on commit 350fc80

Please sign in to comment.