summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/ScriptState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/ScriptState.cpp')
-rw-r--r--WebCore/bindings/v8/ScriptState.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/WebCore/bindings/v8/ScriptState.cpp b/WebCore/bindings/v8/ScriptState.cpp
index 99557b5..68593e7 100644
--- a/WebCore/bindings/v8/ScriptState.cpp
+++ b/WebCore/bindings/v8/ScriptState.cpp
@@ -37,6 +37,7 @@
#include "ScriptController.h"
#include <wtf/Assertions.h>
+#include <wtf/StdLibExtras.h>
namespace WebCore {
@@ -58,7 +59,7 @@ ScriptState::~ScriptState()
m_context.Clear();
}
-ScriptState* scriptStateFromNode(Node* node)
+ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node* node)
{
// This should be never reached with V8 bindings (WebKit only uses it
// for non-JS bindings)
@@ -66,11 +67,17 @@ ScriptState* scriptStateFromNode(Node* node)
return 0;
}
-ScriptState* scriptStateFromPage(Page* page)
+ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page* page)
{
- // This should be never reached with V8 bindings.
- ASSERT_NOT_REACHED();
- return 0;
+ // This should be only reached with V8 bindings from single process layout tests.
+ return page->mainFrame()->script()->mainWorldScriptState();
+}
+
+// FIXME: Stub method so we compile. Currently called from FrameLoader.cpp.
+DOMWrapperWorld* mainThreadNormalWorld()
+{
+ DEFINE_STATIC_LOCAL(DOMWrapperWorld, oneWorld, ());
+ return &oneWorld;
}
}