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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 355005: Merge 30496 - First attempt at fixing a crash that occurs when we get into We... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: '' Created 11 years, 1 month 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 | Annotate | Revision Log
« 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 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // some events for our delegate. 621 // some events for our delegate.
622 WebViewImpl* webview = webframe_->GetWebViewImpl(); 622 WebViewImpl* webview = webframe_->GetWebViewImpl();
623 WebViewDelegate* d = webview->delegate(); 623 WebViewDelegate* d = webview->delegate();
624 if (d) 624 if (d)
625 d->DidStartLoading(webview); 625 d->DidStartLoading(webview);
626 626
627 WebDataSourceImpl* ds = webframe_->GetDataSourceImpl(); 627 WebDataSourceImpl* ds = webframe_->GetDataSourceImpl();
628 DCHECK(ds) << "DataSource NULL when navigating to reference fragment"; 628 DCHECK(ds) << "DataSource NULL when navigating to reference fragment";
629 if (ds) { 629 if (ds) {
630 GURL url = ds->request().url(); 630 GURL url = ds->request().url();
631 GURL chain_end = ds->GetEndOfRedirectChain(); 631 GURL chain_end;
632 ds->ClearRedirectChain(); 632
633 if (ds->HasRedirectChain()){
634 chain_end = ds->GetEndOfRedirectChain();
635 ds->ClearRedirectChain();
636 }
637
633 638
634 // Figure out if this location change is because of a JS-initiated client 639 // Figure out if this location change is because of a JS-initiated client
635 // redirect (e.g onload/setTimeout document.location.href=). 640 // redirect (e.g onload/setTimeout document.location.href=).
636 // TODO(timsteele): (bugs 1085325, 1046841) We don't get proper redirect 641 // TODO(timsteele): (bugs 1085325, 1046841) We don't get proper redirect
637 // performed/cancelled notifications across anchor navigations, so the 642 // performed/cancelled notifications across anchor navigations, so the
638 // other redirect-tracking code in this class (see dispatch*ClientRedirect() 643 // other redirect-tracking code in this class (see dispatch*ClientRedirect()
639 // and dispatchDidStartProvisionalLoad) is insufficient to catch and 644 // and dispatchDidStartProvisionalLoad) is insufficient to catch and
640 // properly flag these transitions. Once a proper fix for this bug is 645 // properly flag these transitions. Once a proper fix for this bug is
641 // identified and applied the following block may no longer be required. 646 // identified and applied the following block may no longer be required.
642 bool was_client_redirect = 647 bool was_client_redirect =
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 1550
1546 std::string offset_str = url.ExtractFileName(); 1551 std::string offset_str = url.ExtractFileName();
1547 int offset; 1552 int offset;
1548 if (!StringToInt(offset_str, &offset)) 1553 if (!StringToInt(offset_str, &offset))
1549 return; 1554 return;
1550 1555
1551 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); 1556 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
1552 if (d) 1557 if (d)
1553 d->NavigateBackForwardSoon(offset); 1558 d->NavigateBackForwardSoon(offset);
1554 } 1559 }
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