Commit 197fd6f8 authored by weinig@apple.com's avatar weinig@apple.com

2009-04-10 Sam Weinig <sam@webkit.org>

        Reviewed by Darin Adler.

        Add back the keepAlive timer for after the script execution to
        protect the callers of evaluate, as was part of the original intent
        of timer.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluate):
        * page/mac/FrameMac.mm:



git-svn-id: svn://svn.chromium.org/blink/trunk@42417 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e119fe9f
2009-04-10 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add back the keepAlive timer for after the script execution to
protect the callers of evaluate, as was part of the original intent
of timer.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluate):
* page/mac/FrameMac.mm:
2009-04-10 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
......@@ -102,6 +102,10 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
Completion comp = JSC::evaluate(exec, exec->dynamicGlobalObject()->globalScopeChain(), jsSourceCode, m_windowShell);
m_windowShell->window()->globalData()->timeoutChecker.stop();
// Evaluating the JavaScript could cause the frame to be deallocated
// so we start the keep alive timer here.
m_frame->keepAlive();
if (comp.complType() == Normal || comp.complType() == ReturnValue) {
m_sourceURL = savedSourceURL;
return comp.value();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment