From 66d3cbb684d4ecdb3f57a53789d7d736701a645c Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Mon, 26 Feb 2018 22:20:21 +0000 Subject: [PATCH] Merge pull request #511 from brave/browser-laptop-issue-13254 Fix empty devtool profile --- atom/browser/common_web_contents_delegate.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 9b308cb7aa..4563df8b90 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -490,8 +490,12 @@ void CommonWebContentsDelegate::OnSaveFileSelected( const std::string& content, const std::vector& paths) { DCHECK(!paths.empty()); - WriteToFile(paths[0], content); - OnDevToolsSaveToFile(url); + saved_files_[url] = paths[0]; + BrowserThread::PostTaskAndReply( + BrowserThread::FILE, FROM_HERE, + base::Bind(&WriteToFile, paths[0], content), + base::Bind(&CommonWebContentsDelegate::OnDevToolsSaveToFile, + base::Unretained(this), url)); } void CommonWebContentsDelegate::OnSaveFileSelectionCancelled( const std::string url) {