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

Side by Side Diff: third_party/WebKit/Source/modules/eventsource/EventSource.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 /* 1 /*
2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved. 2 * Copyright (C) 2009, 2012 Ericsson AB. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved. 4 * Copyright (C) 2011, Code Aurora Forum. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 void EventSource::abortConnectionAttempt() { 361 void EventSource::abortConnectionAttempt() {
362 DCHECK_EQ(kConnecting, m_state); 362 DCHECK_EQ(kConnecting, m_state);
363 363
364 m_loader = nullptr; 364 m_loader = nullptr;
365 m_state = kClosed; 365 m_state = kClosed;
366 networkRequestEnded(); 366 networkRequestEnded();
367 367
368 dispatchEvent(Event::create(EventTypeNames::error)); 368 dispatchEvent(Event::create(EventTypeNames::error));
369 } 369 }
370 370
371 void EventSource::contextDestroyed() { 371 void EventSource::contextDestroyed(ExecutionContext*) {
372 close(); 372 close();
373 } 373 }
374 374
375 bool EventSource::hasPendingActivity() const { 375 bool EventSource::hasPendingActivity() const {
376 return m_state != kClosed; 376 return m_state != kClosed;
377 } 377 }
378 378
379 DEFINE_TRACE(EventSource) { 379 DEFINE_TRACE(EventSource) {
380 visitor->trace(m_parser); 380 visitor->trace(m_parser);
381 visitor->trace(m_loader); 381 visitor->trace(m_loader);
382 EventTargetWithInlineData::trace(visitor); 382 EventTargetWithInlineData::trace(visitor);
383 ContextLifecycleObserver::trace(visitor); 383 ContextLifecycleObserver::trace(visitor);
384 EventSourceParser::Client::trace(visitor); 384 EventSourceParser::Client::trace(visitor);
385 } 385 }
386 386
387 } // namespace blink 387 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698