Move prog_start_time init after isolate assigned
authorRyan Dahl <ry@tinyclouds.org>
Sat, 17 Dec 2011 07:23:34 +0000 (23:23 -0800)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 27 Dec 2011 20:54:23 +0000 (12:54 -0800)
src/node.cc

index b5331f7..a290739 100644 (file)
@@ -2632,9 +2632,6 @@ static Handle<Value> DebugPause(const Arguments& args) {
 
 
 char** ProcessInit(int argc, char *argv[]) {
-  // Initialize prog_start_time to get relative uptime.
-  uv_uptime(&prog_start_time);
-
   // Hack aroung with the argv pointer. Used for process.title = "blah".
   argv = uv_setup_args(argc, argv);
 
@@ -2765,6 +2762,9 @@ void StartThread(node::Isolate* isolate,
   // FIXME crashes with "CHECK(heap->isolate() == Isolate::Current()) failed"
   //v8_typed_array::AttachBindings(v8::Context::GetCurrent()->Global());
 
+  // Initialize prog_start_time to get relative uptime.
+  uv_uptime(&prog_start_time);
+
   // Create all the objects, load modules, do everything.
   // so your next reading stop should be node::Load()!
   Load(process_l);