Remove process.global
This commit is contained in:
parent
31f8fa222e
commit
f8ce848d9b
@ -1545,11 +1545,6 @@ static void Load(int argc, char *argv[]) {
|
|||||||
ProcessTitleGetter,
|
ProcessTitleGetter,
|
||||||
ProcessTitleSetter);
|
ProcessTitleSetter);
|
||||||
|
|
||||||
|
|
||||||
// Add a reference to the global object
|
|
||||||
Local<Object> global = v8::Context::GetCurrent()->Global();
|
|
||||||
process->Set(String::NewSymbol("global"), global);
|
|
||||||
|
|
||||||
// process.version
|
// process.version
|
||||||
process->Set(String::NewSymbol("version"), String::New(NODE_VERSION));
|
process->Set(String::NewSymbol("version"), String::New(NODE_VERSION));
|
||||||
|
|
||||||
@ -1672,6 +1667,8 @@ static void Load(int argc, char *argv[]) {
|
|||||||
// who do not like how 'src/node.js' setups the module system but do like
|
// who do not like how 'src/node.js' setups the module system but do like
|
||||||
// Node's I/O bindings may want to replace 'f' with their own function.
|
// Node's I/O bindings may want to replace 'f' with their own function.
|
||||||
|
|
||||||
|
// Add a reference to the global object
|
||||||
|
Local<Object> global = v8::Context::GetCurrent()->Global();
|
||||||
Local<Value> args[1] = { Local<Value>::New(process) };
|
Local<Value> args[1] = { Local<Value>::New(process) };
|
||||||
|
|
||||||
f->Call(global, 1, args);
|
f->Call(global, 1, args);
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
(function (process) {
|
(function (process) {
|
||||||
|
|
||||||
process.global.process = process;
|
global = this;
|
||||||
process.global.global = process.global;
|
global.process = process;
|
||||||
|
global.global = global;
|
||||||
global.GLOBAL = global;
|
global.GLOBAL = global;
|
||||||
global.root = global;
|
global.root = global;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user