Skip to content

Commit

Permalink
Bug 1872296 - Use the same global for promise and chunk r=smaug
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Jan 29, 2024
1 parent 6eff169 commit e935285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dom/streams/ReadableStreamPipeTo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ void PipeToPump::OnReadFulfilled(JSContext* aCx, JS::Handle<JS::Value> aChunk,
// matches other engines' behavior. See
// https://github.com/whatwg/streams/issues/1243.
RefPtr<Promise> promise =
Promise::CreateInfallible(mWriter->GetParentObject());
Promise::CreateInfallible(xpc::CurrentNativeGlobal(aCx));
promise->MaybeResolveWithUndefined();
auto result = promise->ThenWithCycleCollectedArgsJS(
[](JSContext* aCx, JS::Handle<JS::Value>, ErrorResult& aRv,
Expand Down

0 comments on commit e935285

Please sign in to comment.