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

Side by Side Diff: chrome/browser/external_tab_container.cc

Issue 115477: Fix unchecked pointer dereference that I stumbled across. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | 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 "chrome/browser/external_tab_container.h" 5 #include "chrome/browser/external_tab_container.h"
6 6
7 #include "app/win_util.h" 7 #include "app/win_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/browser/automation/automation_provider.h" 10 #include "chrome/browser/automation/automation_provider.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if (!automation_) 261 if (!automation_)
262 return; 262 return;
263 263
264 static const int kHttpClientErrorStart = 400; 264 static const int kHttpClientErrorStart = 400;
265 static const int kHttpServerErrorEnd = 510; 265 static const int kHttpServerErrorEnd = 510;
266 266
267 switch (type.value) { 267 switch (type.value) {
268 case NotificationType::LOAD_STOP: { 268 case NotificationType::LOAD_STOP: {
269 const LoadNotificationDetails* load = 269 const LoadNotificationDetails* load =
270 Details<LoadNotificationDetails>(details).ptr(); 270 Details<LoadNotificationDetails>(details).ptr();
271 if (PageTransition::IsMainFrame(load->origin())) { 271 LOG_IF(WARNING, load == NULL) << "ExternalTabContainer received "
amit 2009/05/18 21:02:10 I think this can be null for legitimate reasons, s
robertshield 2009/05/18 21:11:13 Done.
272 << "null LoadNotificationDetails in Observe(LOAD_STOP).";
273 if (load != NULL && PageTransition::IsMainFrame(load->origin())) {
272 automation_->Send(new AutomationMsg_TabLoaded(0, tab_handle_, 274 automation_->Send(new AutomationMsg_TabLoaded(0, tab_handle_,
273 load->url())); 275 load->url()));
274 } 276 }
275 break; 277 break;
276 } 278 }
277 case NotificationType::NAV_ENTRY_COMMITTED: { 279 case NotificationType::NAV_ENTRY_COMMITTED: {
278 if (ignore_next_load_notification_) { 280 if (ignore_next_load_notification_) {
279 ignore_next_load_notification_ = false; 281 ignore_next_load_notification_ = false;
280 return; 282 return;
281 } 283 }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (!::IsWindow(parent_window)) { 426 if (!::IsWindow(parent_window)) {
425 return NULL; 427 return NULL;
426 } 428 }
427 if (!IsExternalTabContainer(parent_window)) { 429 if (!IsExternalTabContainer(parent_window)) {
428 return NULL; 430 return NULL;
429 } 431 }
430 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>( 432 ExternalTabContainer* container = reinterpret_cast<ExternalTabContainer*>(
431 GetProp(parent_window, kWindowObjectKey)); 433 GetProp(parent_window, kWindowObjectKey));
432 return container; 434 return container;
433 } 435 }
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