Wire up the final callback to JS
authorPaul Betts <paul@paulbetts.org>
Tue, 20 Oct 2015 01:42:31 +0000 (18:42 -0700)
committerPaul Betts <paul@paulbetts.org>
Tue, 20 Oct 2015 20:17:26 +0000 (13:17 -0700)
atom/browser/api/atom_api_app.cc

index 7792fa6bc3a5f5089844fe623ab8621870e4fb5c..072686dd8d128b7b6c1be56722560dbc88b08c57 100644 (file)
@@ -272,7 +272,10 @@ v8::Local<v8::Value> App::DefaultSession(v8::Isolate* isolate) {
 bool App::OnProcessSingletonNotification(
     const base::CommandLine& command_line,
     const base::FilePath& current_directory) {
-  return true;
+  ProcessSingleton::NotificationCallback cb;
+  mate::Converter<ProcessSingleton::NotificationCallback>::FromV8(isolate(), single_instance_callback_, &cb);
+  
+  return cb.Run(command_line, current_directory);
 }
 
 bool App::MakeSingleInstance(v8::Local<v8::Function> callback) {