Fix crash when destroying NetLog

This commit is contained in:
deepak1556 2017-11-02 20:36:18 +05:30 committed by Cheng Zhao
parent 214cbf357a
commit 505f2ab9e7

View file

@ -38,9 +38,11 @@ NetLog::NetLog() {
} }
NetLog::~NetLog() { NetLog::~NetLog() {
if (file_net_log_observer_) {
file_net_log_observer_->StopObserving(nullptr, base::Closure()); file_net_log_observer_->StopObserving(nullptr, base::Closure());
file_net_log_observer_.reset(); file_net_log_observer_.reset();
} }
}
void NetLog::StartLogging() { void NetLog::StartLogging() {
auto command_line = base::CommandLine::ForCurrentProcess(); auto command_line = base::CommandLine::ForCurrentProcess();