Rename process.__atom_type to process.type.
This commit is contained in:
parent
70c96eeac6
commit
9721c4e761
7 changed files with 8 additions and 8 deletions
|
@ -3,7 +3,7 @@ path = require 'path'
|
||||||
util = require 'util'
|
util = require 'util'
|
||||||
|
|
||||||
# Expose information of current process.
|
# Expose information of current process.
|
||||||
process.__atom_type = 'browser'
|
process.type = 'browser'
|
||||||
process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..'
|
process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..'
|
||||||
|
|
||||||
# We modified the original process.argv to let node.js load the atom.js,
|
# We modified the original process.argv to let node.js load the atom.js,
|
||||||
|
|
|
@ -80,9 +80,9 @@ v8::Handle<v8::Value> Binding(v8::Handle<v8::String> module) {
|
||||||
Get(v8::String::New("process"))->ToObject();
|
Get(v8::String::New("process"))->ToObject();
|
||||||
DCHECK(!process.IsEmpty());
|
DCHECK(!process.IsEmpty());
|
||||||
|
|
||||||
// is_browser = process.__atom_type == 'browser'.
|
// is_browser = process.type == 'browser'.
|
||||||
bool is_browser = std::string("browser") == *v8::String::Utf8Value(
|
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.
|
// Cached in process.__atom_binding_cache.
|
||||||
v8::Local<v8::Object> binding_cache;
|
v8::Local<v8::Object> binding_cache;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module.exports =
|
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.
|
# On Linux we could not access clipboard in renderer process.
|
||||||
require('remote').process.atomBinding 'clipboard'
|
require('remote').process.atomBinding 'clipboard'
|
||||||
else
|
else
|
||||||
|
|
|
@ -15,7 +15,7 @@ class CrashReporter
|
||||||
extra._productName ?= productName
|
extra._productName ?= productName
|
||||||
extra._companyName ?= companyName
|
extra._companyName ?= companyName
|
||||||
extra._version ?=
|
extra._version ?=
|
||||||
if process.__atom_type is 'browser'
|
if process.type is 'browser'
|
||||||
require('app').getVersion()
|
require('app').getVersion()
|
||||||
else
|
else
|
||||||
require('remote').require('app').getVersion()
|
require('remote').require('app').getVersion()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = process.atomBinding 'shell'
|
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
|
module.exports.showItemInFolder = require('remote').process.atomBinding('shell').showItemInFolder
|
||||||
|
|
|
@ -3,7 +3,7 @@ url = require 'url'
|
||||||
Module = require 'module'
|
Module = require 'module'
|
||||||
|
|
||||||
# Expose information of current process.
|
# Expose information of current process.
|
||||||
process.__atom_type = 'renderer'
|
process.type = 'renderer'
|
||||||
process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..'
|
process.resourcesPath = path.resolve process.argv[1], '..', '..', '..', '..'
|
||||||
|
|
||||||
# We modified the original process.argv to let node.js load the
|
# We modified the original process.argv to let node.js load the
|
||||||
|
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 82fa7375af135444b37d8c21fade33ee3d905c42
|
Subproject commit 4e45fee905bc6d0605ba40f312991bcf76ab3cba
|
Loading…
Add table
Add a link
Reference in a new issue