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 — src: use BaseObjectPtr in StreamReq::Dispose · nodejs/node@cf47698

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • stream_base-inl.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/stream_base-inl.h‎

Copy file name to clipboardExpand all lines: src/stream_base-inl.h
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
55

66
#include "async_wrap-inl.h"
7+
#include "base_object-inl.h"
78
#include "node.h"
89
#include "stream_base.h"
910
#include "v8.h"
@@ -31,9 +32,10 @@ StreamReq* StreamReq::FromObject(v8::Local<v8::Object> req_wrap_obj) {
3132
}
3233

3334
void StreamReq::Dispose() {
34-
std::unique_ptr<StreamReq> ptr(this);
35+
BaseObjectPtr<AsyncWrap> destroy_me{GetAsyncWrap()};
3536
object()->SetAlignedPointerInInternalField(
3637
StreamReq::kStreamReqField, nullptr);
38+
destroy_me->Detach();
3739
}
3840

3941
v8::Local<v8::Object> StreamReq::object() {

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.