Пример #1
0
Deprecated::ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall& function, bool& hadException) const
{
    if (m_environment)
        m_environment->willCallInjectedScriptFunction(m_injectedScriptObject.scriptState(), name(), 1);

    JSC::ExecState* scriptState = m_injectedScriptObject.scriptState();
    Deprecated::ScriptValue resultValue;

    {
        JSC::DebuggerEvalEnabler evalEnabler(scriptState);
        resultValue = function.call(hadException);
    }

    if (m_environment)
        m_environment->didCallInjectedScriptFunction(m_injectedScriptObject.scriptState());

    return resultValue;
}
Пример #2
0
JSC::JSValue InjectedScriptBase::callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall& function, bool& hadException) const
{
    JSC::ExecState* scriptState = m_injectedScriptObject.scriptState();
    JSC::DebuggerEvalEnabler evalEnabler(scriptState);
    return function.call(hadException);
}