Diff
Modified: trunk/LayoutTests/ChangeLog (239066 => 239067)
--- trunk/LayoutTests/ChangeLog 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/LayoutTests/ChangeLog 2018-12-11 03:55:49 UTC (rev 239067)
@@ -1,3 +1,19 @@
+2018-12-10 Justin Michaud <[email protected]>
+
+ CS Painting API should support multiple worklets.
+ https://bugs.webkit.org/show_bug.cgi?id=192335
+
+ Reviewed by Dean Jackson.
+
+ * fast/css-custom-paint/animate-repaint-expected.txt:
+ * fast/css-custom-paint/animate-repaint.html:
+ * fast/css-custom-paint/delay-expected.html: Added.
+ * fast/css-custom-paint/delay-repaint-expected.txt: Copied from LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt.
+ * fast/css-custom-paint/delay-repaint.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
+ * fast/css-custom-paint/delay.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
+ * fast/css-custom-paint/multiple-worklets-expected.html: Added.
+ * fast/css-custom-paint/multiple-worklets.html: Added.
+
2018-12-10 Youenn Fablet <[email protected]>
DataChannels created asynchronously never open and are unusable
Modified: trunk/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt (239066 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt 2018-12-11 03:55:49 UTC (rev 239067)
@@ -1,9 +1,5 @@
(repaint rects
(rect 0 0 800 600)
- (rect 0 0 150 150)
- (rect 8 8 784 150)
- (rect 0 0 800 166)
- (rect 0 0 800 600)
(rect 8 8 150 150)
(rect 8 8 150 150)
(rect 8 8 150 150)
Modified: trunk/LayoutTests/fast/css-custom-paint/animate-repaint.html (239066 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/animate-repaint.html 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/LayoutTests/fast/css-custom-paint/animate-repaint.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -22,34 +22,32 @@
</script>
<script type="text/_javascript_">
- if (window.testRunner && window.internals) {
- window.testRunner.dumpAsText(false);
- window.internals.startTrackingRepaints();
- }
- importWorklet(CSS.paintWorklet, document.getElementById('code').textContent);
-
- // FIXME: Once importWorklet returns a promise, these setTimeouts should go away.
- setTimeout(function() {
- document.getElementById('paint').style.setProperty('--my-prop', 'goodbye');
- }, 500);
-
- setTimeout(function() {
- var repaintRects = "No test runner";
+ function onload() {
if (window.testRunner && window.internals) {
+ window.testRunner.dumpAsText(false);
window.internals.startTrackingRepaints();
+ }
+ importWorklet(CSS.paintWorklet, document.getElementById('code').textContent);
- // force a style recalc.
- var dummy = document.body.offsetTop;
+ // FIXME: Once importWorklet returns a promise, these setTimeouts should go away.
+ setTimeout(function() {
+ document.getElementById('paint').style.setProperty('--my-prop', 'goodbye');
+ }, 500);
- repaintRects = window.internals.repaintRectsAsText();
+ setTimeout(function() {
+ var repaintRects = "No test runner";
+ if (window.testRunner && window.internals) {
+ // force a style recalc.
+ var dummy = document.body.offsetTop;
+ repaintRects = window.internals.repaintRectsAsText();
+ window.internals.stopTrackingRepaints();
+ }
- window.internals.stopTrackingRepaints();
- }
-
- var pre = document.createElement('pre');
- document.body.appendChild(pre);
- pre.innerHTML = repaintRects;
- }, 1000);
+ var pre = document.createElement('pre');
+ document.body.appendChild(pre);
+ pre.innerHTML = repaintRects;
+ }, 1000);
+ }
</script>
<style>
@@ -61,6 +59,6 @@
}
</style>
-<body>
+<body _onload_="onload()">
<div id="paint"></div>
</body>
Added: trunk/LayoutTests/fast/css-custom-paint/delay-expected.html (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/delay-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/delay-expected.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<div id="paint" style="width: 150px; height: 150px; background-color: green;" ></div>
Copied: trunk/LayoutTests/fast/css-custom-paint/delay-repaint-expected.txt (from rev 239066, trunk/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt) (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/delay-repaint-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/delay-repaint-expected.txt 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,7 @@
+(repaint rects
+ (rect 0 0 800 600)
+ (rect 8 8 150 150)
+ (rect 8 8 150 150)
+ (rect 8 8 150 150)
+)
+
Copied: trunk/LayoutTests/fast/css-custom-paint/delay-repaint.html (from rev 239066, trunk/LayoutTests/fast/css-custom-paint/animate-repaint.html) (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/delay-repaint.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/delay-repaint.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,65 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSPaintingAPIEnabled=true ] -->
+<meta name="author" title="Justin Michaud" href=""
+<meta name="assert" content="Test that paint worklets repaint when modules are added, and correctly watch properties">
+<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
+<script src=""
+
+<script id="code" type="text/worklet">
+ class MyPaint {
+ static get inputProperties() { return ['--my-prop']; }
+
+ paint(ctx, geom, properties) {
+ if (properties.get('--my-prop') == 5) {
+ ctx.fillStyle = "green";
+ } else {
+ ctx.fillStyle = "red";
+ }
+ ctx.fillRect(0, 0, geom.width, geom.height);
+ }
+ }
+ registerPaint('my-paint', MyPaint);
+</script>
+
+<script type="text/_javascript_">
+function onload() {
+ if (window.testRunner && window.internals) {
+ window.testRunner.dumpAsText(false);
+ window.internals.startTrackingRepaints();
+ }
+
+ // FIXME: Once importWorklet returns a promise, these setTimeouts should go away.
+ setTimeout(function() {
+ importWorklet(CSS.paintWorklet, document.getElementById('code').textContent);
+ }, 500);
+
+ setTimeout(function() {
+ paint.style.setProperty('--my-prop', 5);
+ }, 2000);
+
+ setTimeout(function() {
+ var repaintRects = "No test runner";
+ if (window.testRunner && window.internals) {
+ // force a style recalc.
+ var dummy = document.body.offsetTop;
+ repaintRects = window.internals.repaintRectsAsText();
+ window.internals.stopTrackingRepaints();
+ }
+
+ var pre = document.createElement('pre');
+ document.body.appendChild(pre);
+ pre.innerHTML = repaintRects;
+ }, 2500);
+}
+</script>
+
+<style>
+ #paint {
+ background-image: paint(my-paint);
+ width: 150px;
+ height: 150px;
+ }
+</style>
+
+<body _onload_="onload()">
+ <div id="paint"></div>
+</body>
Copied: trunk/LayoutTests/fast/css-custom-paint/delay.html (from rev 239066, trunk/LayoutTests/fast/css-custom-paint/animate-repaint.html) (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/delay.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/delay.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,43 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSPaintingAPIEnabled=true ] -->
+<meta name="author" title="Justin Michaud" href=""
+<meta name="assert" content="Test that paint worklets repaint when modules are added, and correctly watch properties">
+<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
+<script src=""
+
+<script id="code" type="text/worklet">
+ class MyPaint {
+ static get inputProperties() { return ['--my-prop']; }
+
+ paint(ctx, geom, properties) {
+ if (properties.get('--my-prop') == 5) {
+ ctx.fillStyle = "green";
+ } else {
+ ctx.fillStyle = "red";
+ }
+ ctx.fillRect(0, 0, geom.width, geom.height);
+ }
+ }
+ registerPaint('my-paint', MyPaint);
+</script>
+
+<script type="text/_javascript_">
+ setTimeout(function() {
+ importWorklet(CSS.paintWorklet, document.getElementById('code').textContent);
+ }, 500);
+ // FIXME: This should use a promise once addModule supports it.
+ setTimeout(function() {
+ paint.style.setProperty('--my-prop', 5);
+ }, 2000);
+</script>
+
+<style>
+ #paint {
+ background-image: paint(my-paint);
+ width: 150px;
+ height: 150px;
+ }
+</style>
+
+<body>
+ <div id="paint"></div>
+</body>
Added: trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-expected.html (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-expected.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div id="paint" style="width: 150px; height: 150px; background-color: purple;" ></div>
+<div id="paint2" style="width: 150px; height: 150px; background-color: green;" ></div>
Added: trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-isolation-expected.html (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-isolation-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-isolation-expected.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div id="paint" style="width: 150px; height: 150px; background-color: green;" ></div>
+<div id="paint2" style="width: 150px; height: 150px; background-color: green;" ></div>
Added: trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-isolation.html (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-isolation.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/multiple-worklets-isolation.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,47 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSPaintingAPIEnabled=true ] -->
+<script src=""
+<meta name="author" title="Justin Michaud" href=""
+<meta name="assert" content="test multiple modules being added to the paintWorklet are isolated">
+<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
+
+<style>
+ #paint {
+ background-image: paint(my-paint);
+ width: 150px;
+ height: 150px;
+ }
+
+ #paint2 {
+ background-image: paint(my-paint2);
+ width: 150px;
+ height: 150px;
+ }
+</style>
+
+<div id="paint"></div>
+<div id="paint2"></div>
+
+<script id="code1" type="text/worklet">
+function shouldOnlyBeInCode1() {}
+
+registerPaint('my-paint', class {
+ paint(ctx, geom, properties) {
+ ctx.fillStyle = typeof(shouldOnlyBeInCode1) == 'function' ? 'green' : 'red';
+ ctx.fillRect(0, 0, geom.width, geom.height);
+ }
+});
+</script>
+
+<script id="code2" type="text/worklet">
+registerPaint('my-paint2', class {
+ paint(ctx, geom, properties) {
+ ctx.fillStyle = typeof(shouldOnlyBeInCode1) == 'undefined' ? 'green' : 'red';
+ ctx.fillRect(0, 0, geom.width, geom.height);
+ }
+});
+</script>
+
+<script>
+importWorklet(CSS.paintWorklet, document.getElementById('code1').textContent);
+importWorklet(CSS.paintWorklet, document.getElementById('code2').textContent);
+</script>
Added: trunk/LayoutTests/fast/css-custom-paint/multiple-worklets.html (0 => 239067)
--- trunk/LayoutTests/fast/css-custom-paint/multiple-worklets.html (rev 0)
+++ trunk/LayoutTests/fast/css-custom-paint/multiple-worklets.html 2018-12-11 03:55:49 UTC (rev 239067)
@@ -0,0 +1,47 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:CSSPaintingAPIEnabled=true ] -->
+<script src=""
+<meta name="author" title="Justin Michaud" href=""
+<meta name="assert" content="test multiple modules being added to the paintWorklet">
+<link rel="help" content="https://drafts.css-houdini.org/css-paint-api-1/">
+
+<style>
+ #paint {
+ background-image: paint(my-paint2);
+ width: 150px;
+ height: 150px;
+ }
+
+ #paint2 {
+ background-image: paint(my-paint);
+ width: 150px;
+ height: 150px;
+ }
+</style>
+
+<div id="paint"></div>
+<div id="paint2"></div>
+
+<script id="code1" type="text/worklet">
+registerPaint('my-paint', class {
+ paint(ctx, geom, properties) {
+ ctx.fillStyle = 'purple';
+ ctx.fillRect(0, 0, geom.width, geom.height);
+ }
+});
+</script>
+
+<script id="code2" type="text/worklet">
+registerPaint('my-paint2', class {
+ paint(ctx, geom, properties) {
+ ctx.fillStyle = 'green';
+ ctx.fillRect(0, 0, geom.width, geom.height);
+ }
+});
+</script>
+
+<script>
+importWorklet(CSS.paintWorklet, document.getElementById('code1').textContent);
+importWorklet(CSS.paintWorklet, document.getElementById('code2').textContent);
+paint.style.backgroundImage = "paint(my-paint)";
+paint2.style.backgroundImage = "paint(my-paint2)";
+</script>
Modified: trunk/Source/WebCore/ChangeLog (239066 => 239067)
--- trunk/Source/WebCore/ChangeLog 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/ChangeLog 2018-12-11 03:55:49 UTC (rev 239067)
@@ -1,3 +1,33 @@
+2018-12-10 Justin Michaud <[email protected]>
+
+ CS Painting API should support multiple worklets.
+ https://bugs.webkit.org/show_bug.cgi?id=192335
+
+ Reviewed by Dean Jackson.
+
+ Adds a new map to support separate paint worklet global scopes (one for each worklet). Also
+ adds some tests and a fix for a repaint bug that this oncovered, where changing a custom property required
+ for paint would not trigger a repaint if there had not been a valid value set before.
+
+ Test: fast/css-custom-paint/multiple-worklets.html
+
+ * css/CSSPaintImageValue.cpp:
+ (WebCore::CSSPaintImageValue::image):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyProperty):
+ * dom/Document.cpp:
+ (WebCore::Document::prepareForDestruction):
+ (WebCore::Document::paintWorkletGlobalScope):
+ (WebCore::Document::setPaintWorkletGlobalScope):
+ * dom/Document.h:
+ (WebCore::Document::paintWorkletGlobalScope): Deleted.
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::changedCustomPaintWatchedProperty):
+ * worklets/Worklet.cpp:
+ (WebCore::Worklet::addModule):
+ * worklets/WorkletGlobalScope.cpp:
+ (WebCore::WorkletGlobalScope::prepareForDestruction):
+
2018-12-10 Youenn Fablet <[email protected]>
Remove derived classes of RealtimeMediaSourceCenter
Modified: trunk/Source/WebCore/css/CSSPaintImageValue.cpp (239066 => 239067)
--- trunk/Source/WebCore/css/CSSPaintImageValue.cpp 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/css/CSSPaintImageValue.cpp 2018-12-11 03:55:49 UTC (rev 239067)
@@ -51,7 +51,7 @@
{
if (size.isEmpty())
return nullptr;
- auto* selectedGlobalScope = renderElement.document().paintWorkletGlobalScope();
+ auto* selectedGlobalScope = renderElement.document().paintWorkletGlobalScopeForName(m_name);
if (!selectedGlobalScope)
return nullptr;
auto locker = holdLock(selectedGlobalScope->paintDefinitionLock());
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (239066 => 239067)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2018-12-11 03:55:49 UTC (rev 239067)
@@ -1720,13 +1720,14 @@
state.style()->setHasExplicitlyInheritedProperties();
#if ENABLE(CSS_PAINTING_API)
- if (is<CSSPaintImageValue>(*valueToApply) && document().paintWorkletGlobalScope()) {
- // FIXME: This should use the "document paint registration map" from the spec, once it is implemented.
- auto& paintWorklet = *document().paintWorkletGlobalScope();
- auto locker = holdLock(paintWorklet.paintDefinitionLock());
- if (auto* registration = paintWorklet.paintDefinitionMap().get(downcast<CSSPaintImageValue>(*valueToApply).name())) {
- for (auto& property : registration->inputProperties)
- state.style()->addCustomPaintWatchProperty(property);
+ if (is<CSSPaintImageValue>(*valueToApply)) {
+ auto& name = downcast<CSSPaintImageValue>(*valueToApply).name();
+ if (auto* paintWorklet = document().paintWorkletGlobalScopeForName(name)) {
+ auto locker = holdLock(paintWorklet->paintDefinitionLock());
+ if (auto* registration = paintWorklet->paintDefinitionMap().get(name)) {
+ for (auto& property : registration->inputProperties)
+ state.style()->addCustomPaintWatchProperty(property);
+ }
}
}
#endif
Modified: trunk/Source/WebCore/dom/Document.cpp (239066 => 239067)
--- trunk/Source/WebCore/dom/Document.cpp 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/dom/Document.cpp 2018-12-11 03:55:49 UTC (rev 239067)
@@ -2562,10 +2562,9 @@
#endif
#if ENABLE(CSS_PAINTING_API)
- if (m_paintWorkletGlobalScope) {
- m_paintWorkletGlobalScope->prepareForDestruction();
- m_paintWorkletGlobalScope = nullptr;
- }
+ for (auto& scope : m_paintWorkletGlobalScopes.values())
+ scope->prepareForDestruction();
+ m_paintWorkletGlobalScopes.clear();
#endif
m_hasPreparedForDestruction = true;
@@ -8517,10 +8516,16 @@
return *m_paintWorklet;
}
-void Document::setPaintWorkletGlobalScope(Ref<PaintWorkletGlobalScope>&& scope)
+PaintWorkletGlobalScope* Document::paintWorkletGlobalScopeForName(const String& name)
{
- m_paintWorkletGlobalScope = WTFMove(scope);
+ return m_paintWorkletGlobalScopes.get(name);
}
+
+void Document::setPaintWorkletGlobalScopeForName(const String& name, Ref<PaintWorkletGlobalScope>&& scope)
+{
+ auto addResult = m_paintWorkletGlobalScopes.add(name, WTFMove(scope));
+ ASSERT_UNUSED(addResult, addResult);
+}
#endif
} // namespace WebCore
Modified: trunk/Source/WebCore/dom/Document.h (239066 => 239067)
--- trunk/Source/WebCore/dom/Document.h 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/dom/Document.h 2018-12-11 03:55:49 UTC (rev 239067)
@@ -1522,8 +1522,8 @@
#if ENABLE(CSS_PAINTING_API)
Worklet& ensurePaintWorklet();
- PaintWorkletGlobalScope* paintWorkletGlobalScope() { return m_paintWorkletGlobalScope.get(); }
- void setPaintWorkletGlobalScope(Ref<PaintWorkletGlobalScope>&&);
+ PaintWorkletGlobalScope* paintWorkletGlobalScopeForName(const String& name);
+ void setPaintWorkletGlobalScopeForName(const String& name, Ref<PaintWorkletGlobalScope>&&);
#endif
void setAsRunningUserScripts() { m_isRunningUserScripts = true; }
@@ -2072,7 +2072,7 @@
#if ENABLE(CSS_PAINTING_API)
RefPtr<Worklet> m_paintWorklet;
- RefPtr<PaintWorkletGlobalScope> m_paintWorkletGlobalScope;
+ HashMap<String, Ref<PaintWorkletGlobalScope>> m_paintWorkletGlobalScopes;
#endif
bool m_isRunningUserScripts { false };
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (239066 => 239067)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2018-12-11 03:55:49 UTC (rev 239067)
@@ -989,9 +989,11 @@
for (auto& name : *watchPropertiesMap) {
RefPtr<CSSValue> valueA;
RefPtr<CSSValue> valueB;
- if (isCustomPropertyName(name) && a.getCustomProperty(name) && b.getCustomProperty(name)) {
- valueA = CSSCustomPropertyValue::create(*a.getCustomProperty(name));
- valueB = CSSCustomPropertyValue::create(*b.getCustomProperty(name));
+ if (isCustomPropertyName(name)) {
+ if (a.getCustomProperty(name))
+ valueA = CSSCustomPropertyValue::create(*a.getCustomProperty(name));
+ if (b.getCustomProperty(name))
+ valueB = CSSCustomPropertyValue::create(*b.getCustomProperty(name));
} else {
CSSPropertyID propertyID = cssPropertyID(name);
if (!propertyID)
Modified: trunk/Source/WebCore/worklets/Worklet.cpp (239066 => 239067)
--- trunk/Source/WebCore/worklets/Worklet.cpp 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/worklets/Worklet.cpp 2018-12-11 03:55:49 UTC (rev 239067)
@@ -49,9 +49,10 @@
// https://bugs.webkit.org/show_bug.cgi?id=191136
auto context = PaintWorkletGlobalScope::create(document, ScriptSourceCode(moduleURL));
context->evaluate();
- // FIXME: We should store multiple global scopes and choose between them
- // This will not function correctly if multiple modules are added.
- document.setPaintWorkletGlobalScope(WTFMove(context));
+
+ auto locker = holdLock(context->paintDefinitionLock());
+ for (auto& name : context->paintDefinitionMap().keys())
+ document.setPaintWorkletGlobalScopeForName(name, makeRef(context.get()));
}
} // namespace WebCore
Modified: trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp (239066 => 239067)
--- trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp 2018-12-11 03:50:25 UTC (rev 239066)
+++ trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp 2018-12-11 03:55:49 UTC (rev 239067)
@@ -74,7 +74,8 @@
void WorkletGlobalScope::prepareForDestruction()
{
- ASSERT(m_script);
+ if (!m_script)
+ return;
stopActiveDOMObjects();
removeRejectedPromiseTracker();
removeAllEventListeners();