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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 1980893002: Remove OwnPtr::release() calls in core/ (part 4). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/core/loader/DocumentWriter.cpp » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698