| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |