]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix using an null dictionary.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 24 Apr 2014 03:25:06 +0000 (11:25 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 24 Apr 2014 03:25:06 +0000 (11:25 +0800)
atom/browser/api/atom_api_window.cc

index a8482ff44b95b7ed190ad4e59d2dbef7c9511a71..c30db210593d02076d4957cf515614446c167942 100644 (file)
@@ -355,8 +355,8 @@ bool Window::IsCrashed() {
 }
 
 mate::Dictionary Window::GetDevTools(v8::Isolate* isolate) {
+  mate::Dictionary dict(mate::Dictionary::CreateEmpty(isolate));
   content::WebContents* web_contents = window_->GetDevToolsWebContents();
-  mate::Dictionary dict(isolate);
   dict.Set("processId", web_contents->GetRenderProcessHost()->GetID());
   dict.Set("routingId", web_contents->GetRoutingID());
   return dict;