From dc9778f0f2dfe037778410bc36cf55a05946023a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 29 Apr 2014 11:39:31 +0800 Subject: [PATCH] Fix compilation error on Windows. --- atom/browser/api/atom_api_web_contents.cc | 2 +- atom/browser/native_window.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 8195a336..fcc0ea2e 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -198,7 +198,7 @@ void WebContents::OnRendererMessageSync(const string16& channel, // static mate::Handle WebContents::Create( v8::Isolate* isolate, content::WebContents* web_contents) { - return CreateHandle(isolate, new WebContents(web_contents)); + return mate::CreateHandle(isolate, new WebContents(web_contents)); } } // namespace api diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index ed1e7afe..c9cba5a9 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -515,7 +515,8 @@ void NativeWindow::DevToolsSaveToFile(const std::string& url, if (it != saved_files_.end() && !save_as) { path = it->second; } else { - if (!file_dialog::ShowSaveDialog(this, url, base::FilePath(url), &path)) + base::FilePath default_path(base::FilePath::FromUTF8Unsafe(url)); + if (!file_dialog::ShowSaveDialog(this, url, default_path, &path)) return; } -- 2.43.0