      }
      if ($interfaceName eq "HTMLDocument") {
 diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
-index 4dfce70..2ef1042 100644
+index 4dfce70..dcd22d8 100644
 --- a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
 +++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
 @@ -63,6 +63,13 @@

+    ));
+    bool is_nw_protocol = protocol_script->Run()->BooleanValue();
+
+    // Transfer node's global symbols to webkit
+    if (use_node || is_nw_protocol) {
+        // Don't use WebKit's timers in node
+        v8::Local<v8::Object> disableMap = v8::Object::New();
+        disableMap->Set(v8::String::New("setTimeout"), v8::Integer::New(1));
+        disableMap->Set(v8::String::New("clearTimeout"), v8::Integer::New(1));
+        disableMap->Set(v8::String::New("setInterval"), v8::Integer::New(1));
+        disableMap->Set(v8::String::New("clearInterval"), v8::Integer::New(1));
+
+        v8::Local<v8::Object> nodeGlobal = nodeContext->Global();
+        v8::Local<v8::Array> symbols = nodeGlobal->GetPropertyNames();
+        for (unsigned i = 0; i < symbols->Length(); ++i) {
+            v8::Local<v8::Value> key = symbols->Get(i);
+            if (disableMap->Has(key->ToString()))
+                continue;
+            m_global->Set(key, nodeGlobal->Get(key));
+        }
+    }
 
     if (m_frame->document())
         context->AllowCodeGenerationFromStrings(m_frame->document()->contentSecurityPolicy()->allowEval(0, ContentSecurityPolicy::SuppressReport));
@@ -328,6 +372,36 @@ bool V8DOMWindowShell::initializeIfNeeded()
     // we do isolated worlds the WebCore way.
     m_frame->loader()->dispatchDidClearWindowObjectInWorld(0);
 
+    if (use_node) {
+        v8::Local<v8::Script> script = v8::Script::New(v8::String::New(
+            // Make node's relative modules work

 #include <algorithm>
 #include <stdio.h>
 #include <utility>
@@ -81,6 +88,11 @@
 
 namespace WebCore {
 
+static v8::Handle<v8::Value> globalGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info)
+{
+    return node::g_context->Global()->Get(property);
+}
+
 static void reportFatalError(const char* location, const char* message)
 {
     int memoryUsageMB = MemoryUsageSupport::actualMemoryUsageMB();
@@ -319,6 +331,52 @@ bool V8DOMWindowShell::initializeIfNeeded()
 
     setSecurityToken();
 
+    // Do we integrate node?
+    bool use_node = CommandLine::ForCurrentProcess()->HasSwitch(switches::kmNodejs);
+
