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

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

Issue 10959062: Merge 128972 - [Chromium] Fix crash in WebFrameImpl::loadHistoryItem (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 m_frame->loader()->load(resourceRequest, false); 1022 m_frame->loader()->load(resourceRequest, false);
1023 } 1023 }
1024 1024
1025 void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item) 1025 void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item)
1026 { 1026 {
1027 RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item); 1027 RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item);
1028 ASSERT(historyItem); 1028 ASSERT(historyItem);
1029 1029
1030 m_frame->loader()->prepareForHistoryNavigation(); 1030 m_frame->loader()->prepareForHistoryNavigation();
1031 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem( ); 1031 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem( );
1032 m_inSameDocumentHistoryLoad = currentItem->shouldDoSameDocumentNavigationTo( historyItem.get()); 1032 m_inSameDocumentHistoryLoad = currentItem && currentItem->shouldDoSameDocume ntNavigationTo(historyItem.get());
1033 m_frame->page()->goToItem(historyItem.get(), 1033 m_frame->page()->goToItem(historyItem.get(),
1034 FrameLoadTypeIndexedBackForward); 1034 FrameLoadTypeIndexedBackForward);
1035 m_inSameDocumentHistoryLoad = false; 1035 m_inSameDocumentHistoryLoad = false;
1036 } 1036 }
1037 1037
1038 void WebFrameImpl::loadData(const WebData& data, 1038 void WebFrameImpl::loadData(const WebData& data,
1039 const WebString& mimeType, 1039 const WebString& mimeType,
1040 const WebString& textEncoding, 1040 const WebString& textEncoding,
1041 const WebURL& baseURL, 1041 const WebURL& baseURL,
1042 const WebURL& unreachableURL, 1042 const WebURL& unreachableURL,
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 2658
2659 String scriptResult; 2659 String scriptResult;
2660 if (!result.getString(scriptResult)) 2660 if (!result.getString(scriptResult))
2661 return; 2661 return;
2662 2662
2663 if (!m_frame->navigationScheduler()->locationChangePending()) 2663 if (!m_frame->navigationScheduler()->locationChangePending())
2664 m_frame->document()->loader()->writer()->replaceDocument(scriptResult, o wnerDocument.get()); 2664 m_frame->document()->loader()->writer()->replaceDocument(scriptResult, o wnerDocument.get());
2665 } 2665 }
2666 2666
2667 } // namespace WebKit 2667 } // 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