Skip to content

Commit d54432f

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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 9d8d2e1 commit d54432f

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
@@ -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)