From f3bcaf9f88aad2c423ebcd61121562f9834187d4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:11:27 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- dom/streams/ReadableStreamPipeTo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom/streams/ReadableStreamPipeTo.cpp') diff --git a/dom/streams/ReadableStreamPipeTo.cpp b/dom/streams/ReadableStreamPipeTo.cpp index 45cc79b0b2..ed5db4f086 100644 --- a/dom/streams/ReadableStreamPipeTo.cpp +++ b/dom/streams/ReadableStreamPipeTo.cpp @@ -607,7 +607,7 @@ void PipeToPump::OnReadFulfilled(JSContext* aCx, JS::Handle aChunk, // matches other engines' behavior. See // https://github.com/whatwg/streams/issues/1243. RefPtr promise = - Promise::CreateInfallible(mWriter->GetParentObject()); + Promise::CreateInfallible(xpc::CurrentNativeGlobal(aCx)); promise->MaybeResolveWithUndefined(); auto result = promise->ThenWithCycleCollectedArgsJS( [](JSContext* aCx, JS::Handle, ErrorResult& aRv, -- cgit v1.2.3