summaryrefslogtreecommitdiff
path: root/dom/xhr/XMLHttpRequestMainThread.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-09-01 20:56:43 +0000
committerMoonchild <moonchild@palemoon.org>2022-09-01 20:56:43 +0000
commit4078c2dd1e3798a283594b84de68b3ded1e69898 (patch)
treea6b8fcecbd2978397238e0f6fc89acc2cc9769d3 /dom/xhr/XMLHttpRequestMainThread.cpp
parent6638cc1e6d64dcba9c46bce48080fc17f1405f1e (diff)
parent860800629b179e2598801749080911607334e678 (diff)
downloaduxp-4078c2dd1e3798a283594b84de68b3ded1e69898.tar.gz
Merge pull request 'Support EventSource in workers' (#1997) from dbsoft/UXP:1990fix2 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1997
Diffstat (limited to 'dom/xhr/XMLHttpRequestMainThread.cpp')
-rw-r--r--dom/xhr/XMLHttpRequestMainThread.cpp31
1 files changed, 7 insertions, 24 deletions
diff --git a/dom/xhr/XMLHttpRequestMainThread.cpp b/dom/xhr/XMLHttpRequestMainThread.cpp
index ad999c3584..2c3c3ce295 100644
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -310,30 +310,7 @@ XMLHttpRequestMainThread::SetRequestObserver(nsIRequestObserver* aObserver)
mRequestObserver = aObserver;
}
-NS_IMPL_CYCLE_COLLECTION_CLASS(XMLHttpRequestMainThread)
-
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(XMLHttpRequestMainThread)
- bool isBlack = tmp->IsBlack();
- if (isBlack || tmp->mWaitingForOnStopRequest) {
- if (tmp->mListenerManager) {
- tmp->mListenerManager->MarkForCC();
- }
- if (!isBlack && tmp->PreservingWrapper()) {
- // This marks the wrapper black.
- tmp->GetWrapper();
- }
- return true;
- }
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END
-
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_BEGIN(XMLHttpRequestMainThread)
- return tmp->
- IsBlackAndDoesNotNeedTracing(static_cast<DOMEventTargetHelper*>(tmp));
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
-
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(XMLHttpRequestMainThread)
- return tmp->IsBlack();
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
+ NS_IMPL_CYCLE_COLLECTION_CLASS(XMLHttpRequestMainThread)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(XMLHttpRequestMainThread,
XMLHttpRequestEventTarget)
@@ -380,6 +357,12 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(XMLHttpRequestMainThread,
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mResultJSON)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
+bool
+XMLHttpRequestMainThread::IsCertainlyAliveForCC() const
+{
+ return mWaitingForOnStopRequest;
+}
+
// QueryInterface implementation for XMLHttpRequestMainThread
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(XMLHttpRequestMainThread)
NS_INTERFACE_MAP_ENTRY(nsIXMLHttpRequest)