Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "contextify: replace deprecated SetWeak usage"
This reverts commit 95ebc74.
  • Loading branch information
cjihrig committed Mar 18, 2016
commit a1a080ae7a433d09031d70532195abb6a594b0ef
8 changes: 5 additions & 3 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using v8::Uint8Array;
using v8::UnboundScript;
using v8::V8;
using v8::Value;
using v8::WeakCallbackInfo;
using v8::WeakCallbackData;


class ContextifyContext {
Expand All @@ -66,7 +66,7 @@ class ContextifyContext {
// Allocation failure or maximum call stack size reached
if (context_.IsEmpty())
return;
context_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
context_.SetWeak(this, WeakCallback<Context>);
context_.MarkIndependent();
}

Expand Down Expand Up @@ -305,8 +305,10 @@ class ContextifyContext {
}


static void WeakCallback(const WeakCallbackInfo<ContextifyContext>& data) {
template <class T>
static void WeakCallback(const WeakCallbackData<T, ContextifyContext>& data) {
ContextifyContext* context = data.GetParameter();
context->context_.ClearWeak();
delete context;
}

Expand Down