Skip to content

Commit f73716d

Browse files
committed
src: keep object alive in stream_pipe code
This was overlooked in a489583. Refs: #30374 PR-URL: #30666 Fixes: #30643 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 8792c3f commit f73716d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stream_pipe.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void StreamPipe::Unpipe() {
7272
// inside the garbage collector, so we can’t run JS here.
7373
HandleScope handle_scope(env()->isolate());
7474
BaseObjectPtr<StreamPipe> strong_ref{this};
75-
env()->SetImmediate([this](Environment* env) {
75+
env()->SetImmediate([this, strong_ref](Environment* env) {
7676
HandleScope handle_scope(env->isolate());
7777
Context::Scope context_scope(env->context());
7878
Local<Object> object = this->object();

0 commit comments

Comments
 (0)