summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/ScheduledAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/ScheduledAction.cpp')
-rw-r--r--WebCore/bindings/js/ScheduledAction.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/WebCore/bindings/js/ScheduledAction.cpp b/WebCore/bindings/js/ScheduledAction.cpp
index 9e64bce..9a21b6b 100644
--- a/WebCore/bindings/js/ScheduledAction.cpp
+++ b/WebCore/bindings/js/ScheduledAction.cpp
@@ -47,7 +47,7 @@ using namespace JSC;
namespace WebCore {
-ScheduledAction* ScheduledAction::create(ExecState* exec, const ArgList& args)
+ScheduledAction* ScheduledAction::create(ExecState* exec, const ArgList& args, DOMWrapperWorld* isolatedWorld)
{
JSValue v = args.at(0);
CallData callData;
@@ -55,15 +55,16 @@ ScheduledAction* ScheduledAction::create(ExecState* exec, const ArgList& args)
UString string = v.toString(exec);
if (exec->hadException())
return 0;
- return new ScheduledAction(string);
+ return new ScheduledAction(string, isolatedWorld);
}
ArgList argsTail;
args.getSlice(2, argsTail);
- return new ScheduledAction(v, argsTail);
+ return new ScheduledAction(v, argsTail, isolatedWorld);
}
-ScheduledAction::ScheduledAction(JSValue function, const ArgList& args)
+ScheduledAction::ScheduledAction(JSValue function, const ArgList& args, DOMWrapperWorld* isolatedWorld)
: m_function(function)
+ , m_isolatedWorld(isolatedWorld)
{
ArgList::const_iterator end = args.end();
for (ArgList::const_iterator it = args.begin(); it != end; ++it)
@@ -102,7 +103,7 @@ void ScheduledAction::executeFunctionInContext(JSGlobalObject* globalObject, JSV
args.append(m_args[i]);
globalObject->globalData()->timeoutChecker.start();
- call(exec, m_function, callType, callData, thisValue, args);
+ callInWorld(exec, m_function, callType, callData, thisValue, args, m_isolatedWorld.get());
globalObject->globalData()->timeoutChecker.stop();
if (exec->hadException())
@@ -111,7 +112,7 @@ void ScheduledAction::executeFunctionInContext(JSGlobalObject* globalObject, JSV
void ScheduledAction::execute(Document* document)
{
- JSDOMWindow* window = toJSDOMWindow(document->frame());
+ JSDOMWindow* window = toJSDOMWindow(document->frame(), m_isolatedWorld.get());
if (!window)
return;
@@ -125,7 +126,7 @@ void ScheduledAction::execute(Document* document)
executeFunctionInContext(window, window->shell());
Document::updateStyleForAllDocuments();
} else
- frame->loader()->executeScript(m_code);
+ frame->script()->executeScriptInIsolatedWorld(m_isolatedWorld.get(), m_code);
frame->script()->setProcessingTimerCallback(false);
}