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

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

Issue 2396293002: Remove WaitUntilObserver::decrementPendingActivity() from RespondWithObserver::contextDestroyed() (Closed)
Patch Set: add note Created 4 years, 2 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/RespondWithObserver.h" 5 #include "modules/serviceworkers/RespondWithObserver.h"
6 6
7 #include "bindings/core/v8/ScriptFunction.h" 7 #include "bindings/core/v8/ScriptFunction.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 WebURLRequest::RequestContext requestContext, 181 WebURLRequest::RequestContext requestContext,
182 WaitUntilObserver* observer) { 182 WaitUntilObserver* observer) {
183 return new RespondWithObserver(context, eventID, requestURL, requestMode, 183 return new RespondWithObserver(context, eventID, requestURL, requestMode,
184 frameType, requestContext, observer); 184 frameType, requestContext, observer);
185 } 185 }
186 186
187 void RespondWithObserver::contextDestroyed() { 187 void RespondWithObserver::contextDestroyed() {
188 ContextLifecycleObserver::contextDestroyed(); 188 ContextLifecycleObserver::contextDestroyed();
189 if (m_observer) { 189 if (m_observer) {
190 DCHECK_EQ(Pending, m_state); 190 DCHECK_EQ(Pending, m_state);
191 m_observer->decrementPendingActivity();
192 m_observer.clear(); 191 m_observer.clear();
193 } 192 }
194 m_state = Done; 193 m_state = Done;
195 } 194 }
196 195
197 void RespondWithObserver::willDispatchEvent() { 196 void RespondWithObserver::willDispatchEvent() {
198 m_eventDispatchTime = WTF::currentTime(); 197 m_eventDispatchTime = WTF::currentTime();
199 } 198 }
200 199
201 void RespondWithObserver::didDispatchEvent(DispatchEventResult dispatchResult) { 200 void RespondWithObserver::didDispatchEvent(DispatchEventResult dispatchResult) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 m_requestContext(requestContext), 337 m_requestContext(requestContext),
339 m_state(Initial), 338 m_state(Initial),
340 m_observer(observer) {} 339 m_observer(observer) {}
341 340
342 DEFINE_TRACE(RespondWithObserver) { 341 DEFINE_TRACE(RespondWithObserver) {
343 visitor->trace(m_observer); 342 visitor->trace(m_observer);
344 ContextLifecycleObserver::trace(visitor); 343 ContextLifecycleObserver::trace(visitor);
345 } 344 }
346 345
347 } // namespace blink 346 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698