Index: Source/modules/serviceworkers/ServiceWorker.h |
diff --git a/Source/modules/serviceworkers/ServiceWorker.h b/Source/modules/serviceworkers/ServiceWorker.h |
index b236482cbafe8beb81e43ad9f11ffe157f3004c1..261880e6d1ea4ddc16e1316df6cf7b39d26be652 100644 |
--- a/Source/modules/serviceworkers/ServiceWorker.h |
+++ b/Source/modules/serviceworkers/ServiceWorker.h |
@@ -46,6 +46,7 @@ namespace blink { |
class ScriptPromiseResolver; |
class ServiceWorker final : public AbstractWorker, public WebServiceWorkerProxy { |
+ WILL_BE_USING_PRE_FINALIZER(ServiceWorker, dispose); |
DEFINE_WRAPPERTYPEINFO(); |
public: |
// For CallbackPromiseAdapter |
@@ -53,6 +54,8 @@ public: |
static PassRefPtrWillBeRawPtr<ServiceWorker> take(ScriptPromiseResolver*, WebType* worker); |
static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType*); |
+ |
+ ~ServiceWorker() override; |
static void dispose(WebType*); |
void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, ExceptionState&); |
@@ -90,6 +93,8 @@ private: |
virtual bool hasPendingActivity() const override; |
virtual void stop() override; |
+ void dispose(); |
+ |
OwnPtr<WebServiceWorker> m_outerWorker; |
ProxyState m_proxyState; |
}; |