| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 WebURLRequest::RequestContextUnspecified) { | 403 WebURLRequest::RequestContextUnspecified) { |
| 404 // FIXME: We load URLs without setting a TargetType (and therefore a | 404 // FIXME: We load URLs without setting a TargetType (and therefore a |
| 405 // request context) in several places in content/ | 405 // request context) in several places in content/ |
| 406 // (P2PPortAllocatorSession::AllocateLegacyRelaySession, for example). | 406 // (P2PPortAllocatorSession::AllocateLegacyRelaySession, for example). |
| 407 // Remove this once those places are patched up. | 407 // Remove this once those places are patched up. |
| 408 newRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 408 newRequest.setRequestContext(WebURLRequest::RequestContextInternal); |
| 409 } | 409 } |
| 410 | 410 |
| 411 Document* document = toDocument(m_observer->lifecycleContext()); | 411 Document* document = toDocument(m_observer->lifecycleContext()); |
| 412 DCHECK(document); | 412 DCHECK(document); |
| 413 // TODO(yhirano): Remove this CHECK once https://crbug.com/667254 is fixed. |
| 414 CHECK(!m_loader); |
| 413 m_loader = DocumentThreadableLoader::create( | 415 m_loader = DocumentThreadableLoader::create( |
| 414 *document, m_clientAdapter.get(), options, resourceLoaderOptions); | 416 *document, m_clientAdapter.get(), options, resourceLoaderOptions); |
| 415 m_loader->start(webcoreRequest); | 417 m_loader->start(webcoreRequest); |
| 416 } | 418 } |
| 417 | 419 |
| 418 if (!m_loader) { | 420 if (!m_loader) { |
| 419 // FIXME: return meaningful error codes. | 421 // FIXME: return meaningful error codes. |
| 420 m_clientAdapter->didFail(ResourceError()); | 422 m_clientAdapter->didFail(ResourceError()); |
| 421 } | 423 } |
| 422 m_clientAdapter->enableErrorNotifications(); | 424 m_clientAdapter->enableErrorNotifications(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 // there could be a WebURLLoader instance behind the | 488 // there could be a WebURLLoader instance behind the |
| 487 // DocumentThreadableLoader instance. So, for safety, we chose to just | 489 // DocumentThreadableLoader instance. So, for safety, we chose to just |
| 488 // crash here. | 490 // crash here. |
| 489 CHECK(ThreadState::current()); | 491 CHECK(ThreadState::current()); |
| 490 | 492 |
| 491 m_observer->dispose(); | 493 m_observer->dispose(); |
| 492 m_observer = nullptr; | 494 m_observer = nullptr; |
| 493 } | 495 } |
| 494 | 496 |
| 495 } // namespace blink | 497 } // namespace blink |
| OLD | NEW |