From 9721c4e76197fda7f7441d59e1965f0701197d41 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 21 May 2014 22:44:43 +0800 Subject: [PATCH] Rename process.__atom_type to process.type. --- atom/browser/lib/init.coffee | 2 +- atom/common/api/atom_bindings.cc | 4 ++-- atom/common/api/lib/clipboard.coffee | 2 +- atom/common/api/lib/crash-reporter.coffee | 2 +- atom/common/api/lib/shell.coffee | 2 +- atom/renderer/lib/init.coffee | 2 +- vendor/node | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atom/browser/lib/init.coffee b/atom/browser/lib/init.coffee index c9ce616e99da..67ac258097ce 100644 --- a/atom/browser/lib/init.coffee +++ b/atom/browser/lib/init.coffee @@ -3,7 +3,7 @@ path = require 'path' util = require 'util' # Expose information of current process. -process.__atom_type = 'browser' +process.type = 'browser' process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..' # We modified the original process.argv to let node.js load the atom.js, diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index 838f39f952aa..29ec5eca724f 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -80,9 +80,9 @@ v8::Handle Binding(v8::Handle module) { Get(v8::String::New("process"))->ToObject(); DCHECK(!process.IsEmpty()); - // is_browser = process.__atom_type == 'browser'. + // is_browser = process.type == 'browser'. bool is_browser = std::string("browser") == *v8::String::Utf8Value( - process->Get(v8::String::New("__atom_type"))); + process->Get(v8::String::New("type"))); // Cached in process.__atom_binding_cache. v8::Local binding_cache; diff --git a/atom/common/api/lib/clipboard.coffee b/atom/common/api/lib/clipboard.coffee index 99a5754b75c3..6fc075f83750 100644 --- a/atom/common/api/lib/clipboard.coffee +++ b/atom/common/api/lib/clipboard.coffee @@ -1,5 +1,5 @@ module.exports = - if process.platform is 'linux' and process.__atom_type is 'renderer' + if process.platform is 'linux' and process.type is 'renderer' # On Linux we could not access clipboard in renderer process. require('remote').process.atomBinding 'clipboard' else diff --git a/atom/common/api/lib/crash-reporter.coffee b/atom/common/api/lib/crash-reporter.coffee index b99d70fb5dfe..ecbd2f165ddc 100644 --- a/atom/common/api/lib/crash-reporter.coffee +++ b/atom/common/api/lib/crash-reporter.coffee @@ -15,7 +15,7 @@ class CrashReporter extra._productName ?= productName extra._companyName ?= companyName extra._version ?= - if process.__atom_type is 'browser' + if process.type is 'browser' require('app').getVersion() else require('remote').require('app').getVersion() diff --git a/atom/common/api/lib/shell.coffee b/atom/common/api/lib/shell.coffee index 74acaf8c7b98..8e06826f7076 100644 --- a/atom/common/api/lib/shell.coffee +++ b/atom/common/api/lib/shell.coffee @@ -1,4 +1,4 @@ module.exports = process.atomBinding 'shell' -if process.platform is 'win32' and process.__atom_type is 'renderer' +if process.platform is 'win32' and process.type is 'renderer' module.exports.showItemInFolder = require('remote').process.atomBinding('shell').showItemInFolder diff --git a/atom/renderer/lib/init.coffee b/atom/renderer/lib/init.coffee index e781ac417593..09474c96d575 100644 --- a/atom/renderer/lib/init.coffee +++ b/atom/renderer/lib/init.coffee @@ -3,7 +3,7 @@ url = require 'url' Module = require 'module' # Expose information of current process. -process.__atom_type = 'renderer' +process.type = 'renderer' process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..' # We modified the original process.argv to let node.js load the diff --git a/vendor/node b/vendor/node index 82fa7375af13..4e45fee905bc 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 82fa7375af135444b37d8c21fade33ee3d905c42 +Subproject commit 4e45fee905bc6d0605ba40f312991bcf76ab3cba