      // Install the windowWrapper as the prototype of the innerGlobalObject.
      // The full structure of the global object is as follows:
      //
-@@ -444,6 +507,8 @@ void V8DOMWindowShell::clearDocumentProperty()
+@@ -444,6 +514,8 @@ void V8DOMWindowShell::clearDocumentProperty()
  
  void V8DOMWindowShell::setSecurityToken()
  {

+            "process.mainModule.paths = require('module')._nodeModulePaths(process.cwd());"
+        ));
+        script->Run();
+    }
+
+    if (use_node || is_nw_protocol) {

     Document* document = m_frame->document();
 
     // Ask the document's SecurityOrigin to generate a security token.
@@ -470,6 +542,7 @@ void V8DOMWindowShell::setSecurityToken()
     // NOTE: V8 does identity comparison in fast path, must use a symbol
     // as the security token.
     m_context->SetSecurityToken(v8::String::NewSymbol(utf8Token.data(), utf8Token.length()));
