#include "core/events/EventTarget.h"
#include "core/fetch/FetchInitiatorInfo.h"
+#include "core/frame/FrameHost.h"
#include "core/inspector/InspectorCSSAgent.h"
#include "core/inspector/InspectorConsoleAgent.h"
#include "core/inspector/InspectorController.h"
#include "core/inspector/InspectorResourceAgent.h"
#include "core/inspector/InspectorTimelineAgent.h"
#include "core/inspector/InstrumentingAgents.h"
+#include "core/inspector/ScriptAsyncCallStack.h"
+#include "core/inspector/ScriptCallStack.h"
#include "core/inspector/WorkerInspectorController.h"
+#include "core/page/Page.h"
#include "core/workers/WorkerGlobalScope.h"
-namespace WebCore {
+namespace blink {
namespace {
static HashSet<InstrumentingAgents*>* instrumentingAgentsSet = 0;
didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
}
-void continueWithPolicyDownloadImpl(LocalFrame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
-{
- didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
-}
-
void continueWithPolicyIgnoreImpl(LocalFrame* frame, DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r)
{
didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
return source;
}
+void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* callStack)
+{
+ InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
+ if (!instrumentingAgents)
+ return;
+ if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent())
+ callStack->setAsyncCallStack(debuggerAgent->currentAsyncStackTraceForConsole());
+}
+
bool canvasAgentEnabled(ExecutionContext* executionContext)
{
InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
return instrumentationForWorkerGlobalScope(workerGlobalScope);
}
+InstrumentingAgents* instrumentingAgentsFor(FrameHost* host)
+{
+ return instrumentationForPage(&host->page());
+}
+
InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ExecutionContext* context)
{
if (context->isWorkerGlobalScope())
return 0;
}
-} // namespace WebCore
+} // namespace blink