diff options
author | Brian Smith <brian@dbsoft.org> | 2023-10-02 04:42:24 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2023-10-02 04:42:24 -0500 |
commit | ec38250eeadfbcd8b261f3e4f345a9c49d01fcb5 (patch) | |
tree | b81625418c8fa14a9f6249da64fc992e9a5de5e7 /dom | |
parent | b7a5d73ba9752ab9d9c62497997592b290f38a15 (diff) | |
download | uxp-ec38250eeadfbcd8b261f3e4f345a9c49d01fcb5.tar.gz |
Issue #1442 - Part 24 - Prevent FetchStream from incorrectly running on the main thread.
This prevents a deadlock and JSContext related crashes, however this should eventually
be replaced by an EventTargetFor() call when the Dispatcher API is implemented.
Also now that ReadableStream appears stable, toggle the preferences true by default.
Diffstat (limited to 'dom')
-rw-r--r-- | dom/fetch/FetchStream.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/fetch/FetchStream.cpp b/dom/fetch/FetchStream.cpp index 8d2ac7b1df..1c22a71405 100644 --- a/dom/fetch/FetchStream.cpp +++ b/dom/fetch/FetchStream.cpp @@ -403,7 +403,9 @@ FetchStream::FetchStream(nsIGlobalObject* aGlobal, , mGlobal(aGlobal) , mStreamHolder(aStreamHolder) , mOriginalInputStream(aInputStream) - , mOwningEventTarget(nullptr) + // TODO: Replace with mGlobal->EventTargetFor(TaskCategory::Other) + // When we have the Dispatcher API in the tree, see Issue #1442 + , mOwningEventTarget(NS_GetCurrentThread()) { MOZ_DIAGNOSTIC_ASSERT(aInputStream); MOZ_DIAGNOSTIC_ASSERT(aStreamHolder); |