| Index: Source/bindings/v8/ScheduledAction.cpp
|
| diff --git a/Source/bindings/v8/ScheduledAction.cpp b/Source/bindings/v8/ScheduledAction.cpp
|
| index e4780f8a1c4f9f82fcf89132b5450f6adba99443..41074ba02464481191fc31a87902bea2633d236e 100644
|
| --- a/Source/bindings/v8/ScheduledAction.cpp
|
| +++ b/Source/bindings/v8/ScheduledAction.cpp
|
| @@ -90,16 +90,17 @@ void ScheduledAction::execute(Frame* frame)
|
| v8::Handle<v8::Context> context = m_context.newLocal(m_isolate);
|
| if (context.IsEmpty())
|
| return;
|
| - v8::Context::Scope scope(context);
|
|
|
| TRACE_EVENT0("v8", "ScheduledAction::execute");
|
|
|
| if (!m_function.isEmpty()) {
|
| + v8::Context::Scope scope(context);
|
| Vector<v8::Handle<v8::Value> > args;
|
| createLocalHandlesForArgs(&args);
|
| frame->script()->callFunction(m_function.newLocal(m_isolate), context->Global(), args.size(), args.data());
|
| - } else
|
| - frame->script()->compileAndRunScript(m_code);
|
| + } else {
|
| + frame->script()->executeScriptAndReturnValue(context, ScriptSourceCode(m_code));
|
| + }
|
|
|
| // The frame might be invalid at this point because JavaScript could have released it.
|
| }
|
|
|