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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 16325021: Check for NULL frame tree root. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 void WebContentsImpl::OnUpdateFaviconURL( 2478 void WebContentsImpl::OnUpdateFaviconURL(
2479 int32 page_id, 2479 int32 page_id,
2480 const std::vector<FaviconURL>& candidates) { 2480 const std::vector<FaviconURL>& candidates) {
2481 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2481 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2482 DidUpdateFaviconURL(page_id, candidates)); 2482 DidUpdateFaviconURL(page_id, candidates));
2483 } 2483 }
2484 2484
2485 FrameTreeNode* WebContentsImpl::FindFrameTreeNodeByID(int64 frame_id) { 2485 FrameTreeNode* WebContentsImpl::FindFrameTreeNodeByID(int64 frame_id) {
2486 FrameTreeNode* node = NULL; 2486 FrameTreeNode* node = NULL;
2487 std::queue<FrameTreeNode*> queue; 2487 std::queue<FrameTreeNode*> queue;
2488
2489 DCHECK(frame_tree_root_.get()) <<
Charlie Reis 2013/06/04 00:00:55 DCHECKs only get hit during debug builds, so I don
2490 GetLastCommittedURL() << "|" << GetActiveURL();
Charlie Reis 2013/06/04 00:00:55 These wouldn't show up in a crash dump, so at best
2488 queue.push(frame_tree_root_.get()); 2491 queue.push(frame_tree_root_.get());
2489 2492
2490 while (!queue.empty()) { 2493 while (!queue.empty()) {
2491 node = queue.front(); 2494 node = queue.front();
2492 queue.pop(); 2495 queue.pop();
2493 if (node->frame_id() == frame_id) 2496 if (node->frame_id() == frame_id)
2494 return node; 2497 return node;
2495 2498
2496 for (size_t i = 0; i < node->child_count(); ++i) 2499 for (size_t i = 0; i < node->child_count(); ++i)
2497 queue.push(node->child_at(i)); 2500 queue.push(node->child_at(i));
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
3579 } 3582 }
3580 3583
3581 BrowserPluginGuestManager* 3584 BrowserPluginGuestManager*
3582 WebContentsImpl::GetBrowserPluginGuestManager() const { 3585 WebContentsImpl::GetBrowserPluginGuestManager() const {
3583 return static_cast<BrowserPluginGuestManager*>( 3586 return static_cast<BrowserPluginGuestManager*>(
3584 GetBrowserContext()->GetUserData( 3587 GetBrowserContext()->GetUserData(
3585 browser_plugin::kBrowserPluginGuestManagerKeyName)); 3588 browser_plugin::kBrowserPluginGuestManagerKeyName));
3586 } 3589 }
3587 3590
3588 } // namespace content 3591 } // namespace content
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