Example #1
0
InjectedScript WorkerRuntimeAgent::injectedScriptForEval(ErrorString* error, const int* executionContextId)
{
    if (executionContextId) {
        *error = "Execution context id is not supported for workers as there is only one execution context.";
        return InjectedScript();
    }
    JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_workerGlobalScope);
    return injectedScriptManager()->injectedScriptFor(scriptState);
}
Example #2
0
JSC::ExecState* ScriptExecutionContext::execState()
{
    if (is<Document>(*this)) {
        Document& document = downcast<Document>(*this);
        return execStateFromPage(mainThreadNormalWorld(), document.page());
    }

    WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(this);
    return execStateFromWorkerGlobalScope(workerGlobalScope);
}
Example #3
0
InjectedScript WorkerDebuggerAgent::injectedScriptForEval(ErrorString& error, const int* executionContextId)
{
    if (executionContextId) {
        error = ASCIILiteral("Execution context id is not supported for workers as there is only one execution context.");
        return InjectedScript();
    }

    JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(&m_inspectedWorkerGlobalScope);
    return injectedScriptManager().injectedScriptFor(scriptState);
}
Example #4
0
PassRefPtr<ScriptProfile> ScriptProfiler::stopForWorkerGlobalScope(WorkerGlobalScope* context, const String& title)
{
    return stop(execStateFromWorkerGlobalScope(context), title);
}
Example #5
0
void ScriptProfiler::startForWorkerGlobalScope(WorkerGlobalScope* context, const String& title)
{
    start(execStateFromWorkerGlobalScope(context), title);
}