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

Side by Side Diff: content/shell/browser/webkit_test_controller.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/lkgr Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/webkit_test_controller.h" 5 #include "content/shell/browser/webkit_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 DCHECK(CalledOnValidThread()); 415 DCHECK(CalledOnValidThread());
416 if (current_pid_ != base::kNullProcessId) { 416 if (current_pid_ != base::kNullProcessId) {
417 printer_->AddErrorMessage(std::string("#CRASHED - renderer (pid ") + 417 printer_->AddErrorMessage(std::string("#CRASHED - renderer (pid ") +
418 base::IntToString(current_pid_) + ")"); 418 base::IntToString(current_pid_) + ")");
419 } else { 419 } else {
420 printer_->AddErrorMessage("#CRASHED - renderer"); 420 printer_->AddErrorMessage("#CRASHED - renderer");
421 } 421 }
422 DiscardMainWindow(); 422 DiscardMainWindow();
423 } 423 }
424 424
425 void WebKitTestController::WebContentsDestroyed(WebContents* web_contents) { 425 void WebKitTestController::WebContentsDestroyed() {
426 DCHECK(CalledOnValidThread()); 426 DCHECK(CalledOnValidThread());
427 printer_->AddErrorMessage("FAIL: main window was destroyed"); 427 printer_->AddErrorMessage("FAIL: main window was destroyed");
428 DiscardMainWindow(); 428 DiscardMainWindow();
429 } 429 }
430 430
431 void WebKitTestController::Observe(int type, 431 void WebKitTestController::Observe(int type,
432 const NotificationSource& source, 432 const NotificationSource& source,
433 const NotificationDetails& details) { 433 const NotificationDetails& details) {
434 DCHECK(CalledOnValidThread()); 434 DCHECK(CalledOnValidThread());
435 switch (type) { 435 switch (type) {
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 return; 672 return;
673 } 673 }
674 674
675 printer_->AddErrorMessage( 675 printer_->AddErrorMessage(
676 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, 676 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_,
677 result.detail.c_str())); 677 result.detail.c_str()));
678 DiscardMainWindow(); 678 DiscardMainWindow();
679 } 679 }
680 680
681 } // namespace content 681 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698