Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp

Issue 2578193004: Remove ActiveScriptWrappableBase::m_scriptWrappable (Closed)
Patch Set: temp Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 5 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 m_handle->registration()->unregister( 125 m_handle->registration()->unregister(
126 client->provider(), 126 client->provider(),
127 WTF::makeUnique<CallbackPromiseAdapter<bool, ServiceWorkerError>>( 127 WTF::makeUnique<CallbackPromiseAdapter<bool, ServiceWorkerError>>(
128 resolver)); 128 resolver));
129 return promise; 129 return promise;
130 } 130 }
131 131
132 ServiceWorkerRegistration::ServiceWorkerRegistration( 132 ServiceWorkerRegistration::ServiceWorkerRegistration(
133 ExecutionContext* executionContext, 133 ExecutionContext* executionContext,
134 std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) 134 std::unique_ptr<WebServiceWorkerRegistration::Handle> handle)
135 : ActiveScriptWrappable<ServiceWorkerRegistration>(this), 135 : SuspendableObject(executionContext),
136 SuspendableObject(executionContext),
137 m_handle(std::move(handle)), 136 m_handle(std::move(handle)),
138 m_stopped(false) { 137 m_stopped(false) {
139 ASSERT(m_handle); 138 ASSERT(m_handle);
140 ASSERT(!m_handle->registration()->proxy()); 139 ASSERT(!m_handle->registration()->proxy());
141 140
142 if (!executionContext) 141 if (!executionContext)
143 return; 142 return;
144 m_handle->registration()->setProxy(this); 143 m_handle->registration()->setProxy(this);
145 } 144 }
146 145
(...skipping 16 matching lines...) Expand all
163 } 162 }
164 163
165 void ServiceWorkerRegistration::contextDestroyed() { 164 void ServiceWorkerRegistration::contextDestroyed() {
166 if (m_stopped) 165 if (m_stopped)
167 return; 166 return;
168 m_stopped = true; 167 m_stopped = true;
169 m_handle->registration()->proxyStopped(); 168 m_handle->registration()->proxyStopped();
170 } 169 }
171 170
172 } // namespace blink 171 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698