globalPaths = module.globalPaths
globalPaths.push path.join process.resourcesPath, 'atom', 'browser', 'api', 'lib'
-# Do loading in next tick since we still need some initialize work before
-# native bindings can work.
-setImmediate ->
+# Following operations need extra bindings by AtomBindings.
+process.once 'BIND_DONE', ->
# Import common settings.
require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init.js')
versions->Set(mate::StringToV8(isolate, "chrome"),
mate::StringToV8(isolate, CHROME_VERSION_STRING));
}
+
+ v8::Handle<v8::Value> event = mate::StringToV8(isolate, "BIND_DONE");
+ node::MakeCallback(isolate, process, "emit", 1, &event);
}
void AtomBindings::ActivateUVLoop(v8::Isolate* isolate) {
else
# There still some native initialization codes needs "process", delete the
# global reference after they are done.
- setImmediate ->
+ process.once 'BIND_DONE', ->
delete global.process