refactor: simplify process object initialization for sandboxed renderers (#14878)

Also fix `process.windowsStore`.
This commit is contained in:
Milan Burda 2018-09-30 23:24:00 +02:00 committed by Alexey Kuzmin
parent 0127bbc8e8
commit ce38be74df
5 changed files with 45 additions and 43 deletions

View file

@ -20,6 +20,7 @@
#include "base/process/process_metrics_iocounters.h"
#include "base/sys_info.h"
#include "base/threading/thread_restrictions.h"
#include "brightray/common/application_info.h"
#include "native_mate/dictionary.h"
namespace atom {
@ -74,6 +75,11 @@ void AtomBindings::BindTo(v8::Isolate* isolate, v8::Local<v8::Object> process) {
dict.Set("mas", true);
#endif
#if defined(OS_WIN)
if (brightray::IsRunningInDesktopBridge())
dict.Set("windowsStore", true);
#endif
mate::Dictionary versions;
if (dict.Get("versions", &versions)) {
// TODO(kevinsawicki): Make read-only in 2.0 to match node