Run Tizen Webapps in single process mode
[platform/framework/web/crosswalk-tizen.git] / vendor / node / src / node.cc
index aca7991..4b54bf8 100644 (file)
@@ -4232,9 +4232,10 @@ inline void PlatformInit() {
 void Init(int* argc,
           const char** argv,
           int* exec_argc,
-          const char*** exec_argv) {
+          const char*** exec_argv,
+          uv_loop_t* uv_loop_) {
   // Initialize prog_start_time to get relative uptime.
-  prog_start_time = static_cast<double>(uv_now(uv_default_loop()));
+  prog_start_time = static_cast<double>(uv_now(uv_loop_));
 
   if (g_upstream_node_mode) {  // No indent to minimize diff.
   // Make inherited handles noninheritable.
@@ -4243,7 +4244,7 @@ void Init(int* argc,
 
   // init async debug messages dispatching
   // Main thread uses uv_default_loop
-  CHECK_EQ(0, uv_async_init(uv_default_loop(),
+  CHECK_EQ(0, uv_async_init(uv_loop_,
                             &dispatch_debug_messages_async,
                             DispatchDebugMessagesAsyncCallback));
   uv_unref(reinterpret_cast<uv_handle_t*>(&dispatch_debug_messages_async));
@@ -4290,7 +4291,7 @@ void Init(int* argc,
   // performance penalty of frequent EINTR wakeups when the profiler is running.
   // Only do this for v8.log profiling, as it breaks v8::CpuProfiler users.
   if (v8_is_profiling) {
-    uv_loop_configure(uv_default_loop(), UV_LOOP_BLOCK_SIGNAL, SIGPROF);
+    uv_loop_configure(uv_loop_, UV_LOOP_BLOCK_SIGNAL, SIGPROF);
   }
 #endif
 
@@ -4439,7 +4440,7 @@ void FreeEnvironment(Environment* env) {
 }
 
 
-inline int Start(Isolate* isolate, IsolateData* isolate_data,
+inline int Start(Isolate* isolate, IsolateData* isolate_data, // not called
                  int argc, const char* const* argv,
                  int exec_argc, const char* const* exec_argv) {
   HandleScope handle_scope(isolate);
@@ -4500,7 +4501,7 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
   return exit_code;
 }
 
-inline int Start(uv_loop_t* event_loop,
+inline int Start(uv_loop_t* event_loop, // not called
                  int argc, const char* const* argv,
                  int exec_argc, const char* const* exec_argv) {
   Isolate::CreateParams params;
@@ -4562,7 +4563,7 @@ int Start(int argc, char** argv) {
   // optional, in case you're wondering.
   int exec_argc;
   const char** exec_argv;
-  Init(&argc, const_cast<const char**>(argv), &exec_argc, &exec_argv);
+  // Init(&argc, const_cast<const char**>(argv), &exec_argc, &exec_argv);
 
 #if HAVE_OPENSSL
   if (const char* extra = secure_getenv("NODE_EXTRA_CA_CERTS"))