]> khamidou — GitHub mirrors - electron.git/commitdiff
Allow WM_COPYDATA from all processes
authorPaul Betts <paul@paulbetts.org>
Wed, 21 Oct 2015 00:36:05 +0000 (17:36 -0700)
committerPaul Betts <paul@paulbetts.org>
Wed, 21 Oct 2015 00:36:05 +0000 (17:36 -0700)
chromium_src/chrome/browser/process_singleton_win.cc

index b1008c37607b6f655411c9f36a176c2c3617c109..0007b713b13b14ed61060f073bcb4794043a1ff6 100644 (file)
@@ -293,6 +293,11 @@ bool ProcessSingleton::Create() {
         bool result = window_.CreateNamed(
             base::Bind(&ProcessLaunchNotification, notification_callback_),
             user_data_dir_.value());
+
+        // NB: Ensure that if the primary app gets started as elevated
+        // admin inadvertently, secondary windows running not as elevated
+        // will still be able to send messages
+        ::ChangeWindowMessageFilterEx(window_.hwnd(), WM_COPYDATA, MSGFLT_ALLOW, NULL);
         CHECK(result && window_.hwnd());
       }
     }