void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* callStack)
{
    InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
    if (!instrumentingAgents)
        return;
    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
        callStack->setAsyncCallStack(debuggerAgent->currentAsyncStackTraceForConsole());
}
InstrumentingAgents* instrumentingAgentsFor(RenderObject* renderer)
{
    return instrumentingAgentsFor(renderer->frame());
}
bool timelineAgentEnabled(ExecutionContext* executionContext)
{
    InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
    return instrumentingAgents && instrumentingAgents->inspectorTimelineAgent();
}
bool consoleAgentEnabled(ExecutionContext* executionContext)
{
    InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
    InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAgents->inspectorConsoleAgent() : 0;
    return consoleAgent && consoleAgent->enabled();
}
bool canvasAgentEnabled(ExecutionContext* executionContext)
{
    InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
    return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent();
}
InstrumentingAgents* instrumentingAgentsFor(EventTarget* eventTarget)
{
    if (!eventTarget)
        return 0;
    return instrumentingAgentsFor(eventTarget->executionContext());
}