void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, DOMWrapperWorld* world) { InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent(); if (pageAgent) pageAgent->didClearWindowObjectInWorld(frame, world); if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent()) inspectorAgent->didClearWindowObjectInWorld(frame, world); #if ENABLE(JAVASCRIPT_DEBUGGER) if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) { if (pageAgent && world == mainThreadNormalWorld() && frame == pageAgent->mainFrame()) debuggerAgent->didClearMainFrameWindowObject(); } #endif }
String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script) { DEFINE_STATIC_LOCAL(String, sourceMapHttpHeader, ("X-SourceMap")); String sourceMapURL = ContentSearchUtils::findSourceMapURL(script.source); if (!sourceMapURL.isEmpty()) return sourceMapURL; if (script.url.isEmpty()) return String(); InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgent(); if (!pageAgent) return String(); CachedResource* resource = pageAgent->cachedResource(pageAgent->mainFrame(), KURL(ParsedURLString, script.url)); if (resource) return resource->response().httpHeaderField(sourceMapHttpHeader); return String(); }