]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix compilation error on Windows.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 29 Apr 2014 03:39:31 +0000 (11:39 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 29 Apr 2014 03:39:31 +0000 (11:39 +0800)
atom/browser/api/atom_api_web_contents.cc
atom/browser/native_window.cc

index 8195a336c2609da6eaa2425980f77fed34698b6f..fcc0ea2e8855f751ee1c3c33bbf8cbdeaf20cdaf 100644 (file)
@@ -198,7 +198,7 @@ void WebContents::OnRendererMessageSync(const string16& channel,
 // static
 mate::Handle<WebContents> 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
index ed1e7afec5846ffe47dee9c064f5adef96a1e058..c9cba5a9e4ea29e9740e1421c8095cb77f08e3d2 100644 (file)
@@ -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;
   }