void InspectorProfilerAgent::stopUserInitiatedProfiling() { m_recordingUserInitiatedProfile = false; String title = getCurrentUserInitiatedProfileName(); #if USE(JSC) JSC::ExecState* scriptState = toJSDOMWindow(m_inspectorController->inspectedPage()->mainFrame(), debuggerWorld())->globalExec(); #else // Use null script state to avoid filtering by context security token. // All functions from all iframes should be visible from Inspector UI. ScriptState* scriptState = 0; #endif RefPtr<ScriptProfile> profile = ScriptProfiler::stop(scriptState, title); if (profile) addProfile(profile, 0, String()); toggleRecordButton(false); }
static inline void startProfiling(Frame* frame, const String& title) { JSC::LegacyProfiler::profiler()->startProfiling(toJSDOMWindow(frame, debuggerWorld())->globalExec(), title); }
void InspectorProfilerAgent::startUserInitiatedProfiling() { if (!enabled()) { enable(false); ScriptDebugServer::shared().recompileAllJSFunctions(); } m_recordingUserInitiatedProfile = true; String title = getCurrentUserInitiatedProfileName(true); #if USE(JSC) JSC::ExecState* scriptState = toJSDOMWindow(m_inspectorController->inspectedPage()->mainFrame(), debuggerWorld())->globalExec(); #else ScriptState* scriptState = 0; #endif ScriptProfiler::start(scriptState, title); addStartProfilingMessageToConsole(title, 0, String()); toggleRecordButton(true); }
PassRefPtr<ScriptProfile> ScriptProfiler::stopForPage(Page* inspectedPage, const String& title) { JSC::ExecState* scriptState = toJSDOMWindow(&inspectedPage->mainFrame(), debuggerWorld())->globalExec(); return stop(scriptState, title); }
void ScriptProfiler::startForPage(Page* inspectedPage, const String& title) { JSC::ExecState* scriptState = toJSDOMWindow(&inspectedPage->mainFrame(), debuggerWorld())->globalExec(); start(scriptState, title); }
static inline PassRefPtr<JSC::Profile> stopProfiling(Frame* frame, const String& title) { return stopProfiling(toJSDOMWindow(frame, debuggerWorld())->globalExec(), title); }
static inline void startProfiling(Frame* frame, const String& title, RefPtr<Stopwatch>&& stopwatch) { startProfiling(toJSDOMWindow(frame, debuggerWorld())->globalExec(), title, WTFMove(stopwatch)); }