| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 | 615 |
| 616 OwnPtr<CrossOriginPreflightResultCacheItem> preflightResult = adoptPtr(new C
rossOriginPreflightResultCacheItem(effectiveAllowCredentials())); | 616 OwnPtr<CrossOriginPreflightResultCacheItem> preflightResult = adoptPtr(new C
rossOriginPreflightResultCacheItem(effectiveAllowCredentials())); |
| 617 if (!preflightResult->parse(response, accessControlErrorDescription) | 617 if (!preflightResult->parse(response, accessControlErrorDescription) |
| 618 || !preflightResult->allowsCrossOriginMethod(m_actualRequest.httpMethod(
), accessControlErrorDescription) | 618 || !preflightResult->allowsCrossOriginMethod(m_actualRequest.httpMethod(
), accessControlErrorDescription) |
| 619 || !preflightResult->allowsCrossOriginHeaders(m_actualRequest.httpHeader
Fields(), accessControlErrorDescription)) { | 619 || !preflightResult->allowsCrossOriginHeaders(m_actualRequest.httpHeader
Fields(), accessControlErrorDescription)) { |
| 620 handlePreflightFailure(response.url().getString(), accessControlErrorDes
cription); | 620 handlePreflightFailure(response.url().getString(), accessControlErrorDes
cription); |
| 621 // |this| may be dead here in async mode. | 621 // |this| may be dead here in async mode. |
| 622 return; | 622 return; |
| 623 } | 623 } |
| 624 | 624 |
| 625 CrossOriginPreflightResultCache::shared().appendEntry(getSecurityOrigin()->t
oString(), m_actualRequest.url(), preflightResult.release()); | 625 CrossOriginPreflightResultCache::shared().appendEntry(getSecurityOrigin()->t
oString(), m_actualRequest.url(), std::move(preflightResult)); |
| 626 } | 626 } |
| 627 | 627 |
| 628 void DocumentThreadableLoader::reportResponseReceived(unsigned long identifier,
const ResourceResponse& response) | 628 void DocumentThreadableLoader::reportResponseReceived(unsigned long identifier,
const ResourceResponse& response) |
| 629 { | 629 { |
| 630 LocalFrame* frame = document().frame(); | 630 LocalFrame* frame = document().frame(); |
| 631 // We are seeing crashes caused by nullptr (crbug.com/578849). But the frame | 631 // We are seeing crashes caused by nullptr (crbug.com/578849). But the frame |
| 632 // must be set here. TODO(horo): Find the root cause of the unset frame. | 632 // must be set here. TODO(horo): Find the root cause of the unset frame. |
| 633 ASSERT(frame); | 633 ASSERT(frame); |
| 634 if (!frame) | 634 if (!frame) |
| 635 return; | 635 return; |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 974 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 975 } | 975 } |
| 976 | 976 |
| 977 Document& DocumentThreadableLoader::document() const | 977 Document& DocumentThreadableLoader::document() const |
| 978 { | 978 { |
| 979 ASSERT(m_document); | 979 ASSERT(m_document); |
| 980 return *m_document; | 980 return *m_document; |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace blink | 983 } // namespace blink |
| OLD | NEW |