Skip to content

Commit 7647bfe

Browse files
addaleaxMylesBorins
authored andcommitted
src: keep object alive in stream_pipe code
This was overlooked in a489583. Refs: #30374 Backport-PR-URL: #32301 PR-URL: #30666 Fixes: #30643 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5f95e69 commit 7647bfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stream_pipe.cc

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

0 commit comments

Comments
 (0)