forked from deanm/plask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode-load.diff
30 lines (25 loc) · 1.04 KB
/
node-load.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
commit f6385e5e70868b1b39fb9d4b5325b47b2c42c79e
Author: Dean McNamee <[email protected]>
Date: Fri Dec 21 16:12:45 2012 +0100
Move symbol caching to Load().
diff --git a/src/node.cc b/src/node.cc
index 3e8d2d6..ae189d5 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -2374,6 +2374,9 @@ static void SignalExit(int signal) {
void Load(Handle<Object> process_l) {
+ process_symbol = NODE_PSYMBOL("process");
+ domain_symbol = NODE_PSYMBOL("domain");
+
// Compile, execute the src/node.js file. (Which was included as static C
// string in node_natives.h. 'natve_node' is the string containing that
// source code.)
@@ -2983,9 +2986,6 @@ int Start(int argc, char *argv[]) {
Persistent<Context> context = Context::New();
Context::Scope context_scope(context);
- process_symbol = NODE_PSYMBOL("process");
- domain_symbol = NODE_PSYMBOL("domain");
-
// Use original argv, as we're just copying values out of it.
Handle<Object> process_l = SetupProcessObject(argc, argv);
v8_typed_array::AttachBindings(context->Global());