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

Side by Side Diff: third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.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
« no previous file with comments | « third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 public: 313 public:
314 Observer(WebAssociatedURLLoaderImpl* parent, Document* document) 314 Observer(WebAssociatedURLLoaderImpl* parent, Document* document)
315 : ContextLifecycleObserver(document), m_parent(parent) {} 315 : ContextLifecycleObserver(document), m_parent(parent) {}
316 316
317 void dispose() { 317 void dispose() {
318 m_parent = nullptr; 318 m_parent = nullptr;
319 clearContext(); 319 clearContext();
320 } 320 }
321 321
322 void contextDestroyed() override { 322 void contextDestroyed(ExecutionContext*) override {
323 if (m_parent) 323 if (m_parent)
324 m_parent->documentDestroyed(); 324 m_parent->documentDestroyed();
325 } 325 }
326 326
327 DEFINE_INLINE_VIRTUAL_TRACE() { ContextLifecycleObserver::trace(visitor); } 327 DEFINE_INLINE_VIRTUAL_TRACE() { ContextLifecycleObserver::trace(visitor); }
328 328
329 WebAssociatedURLLoaderImpl* m_parent; 329 WebAssociatedURLLoaderImpl* m_parent;
330 }; 330 };
331 331
332 WebAssociatedURLLoaderImpl::WebAssociatedURLLoaderImpl( 332 WebAssociatedURLLoaderImpl::WebAssociatedURLLoaderImpl(
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // there could be a WebURLLoader instance behind the 488 // there could be a WebURLLoader instance behind the
489 // DocumentThreadableLoader instance. So, for safety, we chose to just 489 // DocumentThreadableLoader instance. So, for safety, we chose to just
490 // crash here. 490 // crash here.
491 CHECK(ThreadState::current()); 491 CHECK(ThreadState::current());
492 492
493 m_observer->dispose(); 493 m_observer->dispose();
494 m_observer = nullptr; 494 m_observer = nullptr;
495 } 495 }
496 496
497 } // namespace blink 497 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698