      if (m_frame->document())
          context->AllowCodeGenerationFromStrings(m_frame->document()->contentSecurityPolicy()->allowEval(0, ContentSecurityPolicy::SuppressReport));
  
-@@ -385,6 +443,11 @@ bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWind
+@@ -385,6 +450,11 @@ bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWind
      V8DOMWrapper::setDOMWrapper(v8::Handle<v8::Object>::Cast(windowWrapper->GetPrototype()), &V8DOMWindow::info, window);
      V8DOMWrapper::setJSWrapperForDOMObject(PassRefPtr<DOMWindow>(window), windowWrapper);
  

+            "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()));
