GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — contextify: replace deprecated SetWeak usage · nodejs/node@8ebdcd6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_contextify.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_contextify.cc‎

Copy file name to clipboardExpand all lines: src/node_contextify.cc
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ using v8::TryCatch;
4343
using v8::UnboundScript;
4444
using v8::V8;
4545
using v8::Value;
46-
using v8::WeakCallbackData;
46+
using v8::WeakCallbackInfo;
4747

4848

4949
class ContextifyContext {
@@ -64,7 +64,7 @@ class ContextifyContext {
6464
// Allocation failure or maximum call stack size reached
6565
if (context_.IsEmpty())
6666
return;
67-
context_.SetWeak(this, WeakCallback<Context>);
67+
context_.SetWeak(this, WeakCallback, v8::WeakCallbackType::kParameter);
6868
context_.MarkIndependent();
6969
}
7070

@@ -302,10 +302,8 @@ class ContextifyContext {
302302
}
303303

304304

305-
template <class T>
306-
static void WeakCallback(const WeakCallbackData<T, ContextifyContext>& data) {
305+
static void WeakCallback(const WeakCallbackInfo<ContextifyContext>& data) {
307306
ContextifyContext* context = data.GetParameter();
308-
context->context_.ClearWeak();
309307
delete context;
310308
}
311309

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.