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

Side by Side Diff: Source/WebKit/chromium/src/WebFrameImpl.cpp

Issue 10960021: Merge 128972 - [Chromium] Fix crash in WebFrameImpl::loadHistoryItem (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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 | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 m_frame->loader()->load(resourceRequest, false); 1009 m_frame->loader()->load(resourceRequest, false);
1010 } 1010 }
1011 1011
1012 void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item) 1012 void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item)
1013 { 1013 {
1014 RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item); 1014 RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item);
1015 ASSERT(historyItem); 1015 ASSERT(historyItem);
1016 1016
1017 m_frame->loader()->prepareForHistoryNavigation(); 1017 m_frame->loader()->prepareForHistoryNavigation();
1018 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem( ); 1018 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem( );
1019 m_inSameDocumentHistoryLoad = currentItem->shouldDoSameDocumentNavigationTo( historyItem.get()); 1019 m_inSameDocumentHistoryLoad = currentItem && currentItem->shouldDoSameDocume ntNavigationTo(historyItem.get());
1020 m_frame->page()->goToItem(historyItem.get(), 1020 m_frame->page()->goToItem(historyItem.get(),
1021 FrameLoadTypeIndexedBackForward); 1021 FrameLoadTypeIndexedBackForward);
1022 m_inSameDocumentHistoryLoad = false; 1022 m_inSameDocumentHistoryLoad = false;
1023 } 1023 }
1024 1024
1025 void WebFrameImpl::loadData(const WebData& data, 1025 void WebFrameImpl::loadData(const WebData& data,
1026 const WebString& mimeType, 1026 const WebString& mimeType,
1027 const WebString& textEncoding, 1027 const WebString& textEncoding,
1028 const WebURL& baseURL, 1028 const WebURL& baseURL,
1029 const WebURL& unreachableURL, 1029 const WebURL& unreachableURL,
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2449 2449
2450 String scriptResult; 2450 String scriptResult;
2451 if (!result.getString(scriptResult)) 2451 if (!result.getString(scriptResult))
2452 return; 2452 return;
2453 2453
2454 if (!m_frame->navigationScheduler()->locationChangePending()) 2454 if (!m_frame->navigationScheduler()->locationChangePending())
2455 m_frame->document()->loader()->writer()->replaceDocument(scriptResult, o wnerDocument.get()); 2455 m_frame->document()->loader()->writer()->replaceDocument(scriptResult, o wnerDocument.get());
2456 } 2456 }
2457 2457
2458 } // namespace WebKit 2458 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698