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

Side by Side Diff: chrome/browser/dom_ui/bug_report_ui.cc

Issue 6066002: Initialize bug_report_ to NULL so as make sure invalid pointer is not freed.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/bug_report_ui.h" 5 #include "chrome/browser/dom_ui/bug_report_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 482
483 483
484 //////////////////////////////////////////////////////////////////////////////// 484 ////////////////////////////////////////////////////////////////////////////////
485 // 485 //
486 // BugReportHandler 486 // BugReportHandler
487 // 487 //
488 //////////////////////////////////////////////////////////////////////////////// 488 ////////////////////////////////////////////////////////////////////////////////
489 BugReportHandler::BugReportHandler(TabContents* tab) 489 BugReportHandler::BugReportHandler(TabContents* tab)
490 : tab_(tab) 490 : tab_(tab)
491 , screenshot_source_(NULL) 491 , screenshot_source_(NULL)
492 , bug_report_(NULL)
492 #if defined(OS_CHROMEOS) 493 #if defined(OS_CHROMEOS)
493 , syslogs_handle_(0) 494 , syslogs_handle_(0)
494 #endif 495 #endif
495 { 496 {
496 } 497 }
497 498
498 BugReportHandler::~BugReportHandler() { 499 BugReportHandler::~BugReportHandler() {
499 // Just in case we didn't send off bug_report_ to SendReport 500 // Just in case we didn't send off bug_report_ to SendReport
500 if (bug_report_) { 501 if (bug_report_) {
501 // If we're deleting the report object, cancel feedback collection first 502 // If we're deleting the report object, cancel feedback collection first
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 BugReportUIHTMLSource* html_source = 801 BugReportUIHTMLSource* html_source =
801 new BugReportUIHTMLSource(handler->Init()); 802 new BugReportUIHTMLSource(handler->Init());
802 // Set up the chrome://bugreport/ source. 803 // Set up the chrome://bugreport/ source.
803 BrowserThread::PostTask( 804 BrowserThread::PostTask(
804 BrowserThread::IO, FROM_HERE, 805 BrowserThread::IO, FROM_HERE,
805 NewRunnableMethod( 806 NewRunnableMethod(
806 Singleton<ChromeURLDataManager>::get(), 807 Singleton<ChromeURLDataManager>::get(),
807 &ChromeURLDataManager::AddDataSource, 808 &ChromeURLDataManager::AddDataSource,
808 make_scoped_refptr(html_source))); 809 make_scoped_refptr(html_source)));
809 } 810 }
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