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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 void AssociatedURLLoader::ClientAdapter::notifyError(Timer<ClientAdapter>* timer
) | 283 void AssociatedURLLoader::ClientAdapter::notifyError(Timer<ClientAdapter>* timer
) |
284 { | 284 { |
285 ASSERT_UNUSED(timer, timer == &m_errorTimer); | 285 ASSERT_UNUSED(timer, timer == &m_errorTimer); |
286 | 286 |
287 if (!m_client) | 287 if (!m_client) |
288 return; | 288 return; |
289 | 289 |
290 m_client->didFail(m_loader, m_error); | 290 m_client->didFail(m_loader, m_error); |
291 } | 291 } |
292 | 292 |
293 class AssociatedURLLoader::Observer final : public GarbageCollectedFinalized<Obs
erver>, public ContextLifecycleObserver { | 293 class AssociatedURLLoader::Observer final : public GarbageCollected<Observer>, p
ublic ContextLifecycleObserver { |
294 USING_GARBAGE_COLLECTED_MIXIN(Observer); | 294 USING_GARBAGE_COLLECTED_MIXIN(Observer); |
295 public: | 295 public: |
296 Observer(AssociatedURLLoader* parent, Document* document) | 296 Observer(AssociatedURLLoader* parent, Document* document) |
297 : ContextLifecycleObserver(document) | 297 : ContextLifecycleObserver(document) |
298 , m_parent(parent) | 298 , m_parent(parent) |
299 { | 299 { |
300 } | 300 } |
301 | 301 |
302 void dispose() | 302 void dispose() |
303 { | 303 { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 // there could be a WebURLLoader instance behind the | 455 // there could be a WebURLLoader instance behind the |
456 // DocumentThreadableLoader instance. So, for safety, we chose to just | 456 // DocumentThreadableLoader instance. So, for safety, we chose to just |
457 // crash here. | 457 // crash here. |
458 RELEASE_ASSERT(ThreadState::current()); | 458 RELEASE_ASSERT(ThreadState::current()); |
459 | 459 |
460 m_observer->dispose(); | 460 m_observer->dispose(); |
461 m_observer = nullptr; | 461 m_observer = nullptr; |
462 } | 462 } |
463 | 463 |
464 } // namespace blink | 464 } // namespace blink |
OLD | NEW |