summaryrefslogtreecommitdiff
path: root/dom/base/WebSocket.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/base/WebSocket.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/base/WebSocket.cpp')
-rw-r--r--dom/base/WebSocket.cpp32
1 files changed, 6 insertions, 26 deletions
diff --git a/dom/base/WebSocket.cpp b/dom/base/WebSocket.cpp
index 19a687cba3..fe06bc93a4 100644
--- a/dom/base/WebSocket.cpp
+++ b/dom/base/WebSocket.cpp
@@ -1402,32 +1402,6 @@ WebSocket::ConstructorCommon(const GlobalObject& aGlobal,
NS_IMPL_CYCLE_COLLECTION_CLASS(WebSocket)
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(WebSocket)
- bool isBlack = tmp->IsBlack();
- if (isBlack || tmp->mKeepingAlive) {
- 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(WebSocket)
- return tmp->IsBlack();
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_IN_CC_END
-
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(WebSocket)
- return tmp->IsBlack();
-NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
-
-NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WebSocket,
- DOMEventTargetHelper)
-NS_IMPL_CYCLE_COLLECTION_TRACE_END
-
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WebSocket,
DOMEventTargetHelper)
if (tmp->mImpl) {
@@ -1444,6 +1418,12 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WebSocket,
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
+bool
+WebSocket::IsCertainlyAliveForCC() const
+{
+ return mKeepingAlive;
+}
+
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(WebSocket)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)