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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 WebURLRequest::FetchRequestMode requestMode, 200 WebURLRequest::FetchRequestMode requestMode,
201 WebURLRequest::FetchRedirectMode redirectMode, 201 WebURLRequest::FetchRedirectMode redirectMode,
202 WebURLRequest::FrameType frameType, 202 WebURLRequest::FrameType frameType,
203 WebURLRequest::RequestContext requestContext, 203 WebURLRequest::RequestContext requestContext,
204 WaitUntilObserver* observer) { 204 WaitUntilObserver* observer) {
205 return new RespondWithObserver(context, fetchEventID, requestURL, requestMode, 205 return new RespondWithObserver(context, fetchEventID, requestURL, requestMode,
206 redirectMode, frameType, requestContext, 206 redirectMode, frameType, requestContext,
207 observer); 207 observer);
208 } 208 }
209 209
210 void RespondWithObserver::contextDestroyed() { 210 void RespondWithObserver::contextDestroyed(ExecutionContext*) {
211 ContextLifecycleObserver::contextDestroyed();
212 if (m_observer) { 211 if (m_observer) {
213 DCHECK_EQ(Pending, m_state); 212 DCHECK_EQ(Pending, m_state);
214 m_observer.clear(); 213 m_observer.clear();
215 } 214 }
216 m_state = Done; 215 m_state = Done;
217 } 216 }
218 217
219 void RespondWithObserver::willDispatchEvent() { 218 void RespondWithObserver::willDispatchEvent() {
220 m_eventDispatchTime = WTF::currentTime(); 219 m_eventDispatchTime = WTF::currentTime();
221 } 220 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 m_requestContext(requestContext), 376 m_requestContext(requestContext),
378 m_state(Initial), 377 m_state(Initial),
379 m_observer(observer) {} 378 m_observer(observer) {}
380 379
381 DEFINE_TRACE(RespondWithObserver) { 380 DEFINE_TRACE(RespondWithObserver) {
382 visitor->trace(m_observer); 381 visitor->trace(m_observer);
383 ContextLifecycleObserver::trace(visitor); 382 ContextLifecycleObserver::trace(visitor);
384 } 383 }
385 384
386 } // namespace blink 385 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698