| Index: third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
|
| diff --git a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
|
| index 3e1165655c4a636622b66e7c3952f77dc46e42fd..c854bfb2df5e953d7b6281ac2eeb9402ec976d57 100644
|
| --- a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
|
| +++ b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "modules/csspaint/WindowPaintWorklet.h"
|
|
|
| +#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "modules/csspaint/PaintWorklet.h"
|
| @@ -46,6 +47,13 @@ PaintWorklet* WindowPaintWorklet::paintWorklet(ExecutionContext* executionContex
|
| return m_paintWorklet.get();
|
| }
|
|
|
| +void WindowPaintWorklet::willDetachGlobalObjectFromFrame()
|
| +{
|
| + if (m_paintWorklet)
|
| + m_paintWorklet->workletGlobalScope()->scriptController()->dispose();
|
| + DOMWindowProperty::willDetachGlobalObjectFromFrame();
|
| +}
|
| +
|
| DEFINE_TRACE(WindowPaintWorklet)
|
| {
|
| visitor->trace(m_paintWorklet);
|
|
|