 diff --git a/Source/WebCore/WebCore.gyp/WebCore.gyp b/Source/WebCore/WebCore.gyp/WebCore.gyp
-index f812f78..4b96eb7 100644
+index db04f41..0061906 100644
 --- a/Source/WebCore/WebCore.gyp/WebCore.gyp
 +++ b/Source/WebCore/WebCore.gyp/WebCore.gyp
 @@ -57,6 +57,7 @@

       '../Modules/filesystem',
       '../Modules/filesystem/chromium',
diff --git a/Source/WebCore/bindings/generic/BindingSecurity.cpp b/Source/WebCore/bindings/generic/BindingSecurity.cpp
index 87f4a57..4d8e7c3 100644
--- a/Source/WebCore/bindings/generic/BindingSecurity.cpp
+++ b/Source/WebCore/bindings/generic/BindingSecurity.cpp
@@ -47,27 +47,8 @@ static bool canAccessDocument(BindingState* state, Document* targetDocument, Sec
     if (!targetDocument)
         return false;
 

+#endif
+        "process.chdir(require('path').dirname(process.mainModule.filename));"
+        "process.mainModule.paths = require('module')._nodeModulePaths(process.cwd());"
+
+        // Use WebKit's console and setTimeout globally
+        "global.console = console;"
+        "global.setTimeout = setTimeout;"
+        "global.clearTimeout = clearTimeout;"
+        "global.setInterval = setInterval;"
+        "global.clearInterval = clearInterval;"
+    ));
+    script->Run();
+
