Changeset 195916 in webkit


Ignore:
Timestamp:
Jan 30, 2016 4:41:57 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r195799 and r195828.
https://bugs.webkit.org/show_bug.cgi?id=153722

Caused assertion failures, severely affecting EWS (Requested
by ap on #webkit).

Reverted changesets:

"Web Inspector: InspectorTimelineAgent doesn't need to
recompile functions because it now uses the sampling profiler"
https://bugs.webkit.org/show_bug.cgi?id=153500
http://trac.webkit.org/changeset/195799

"Attempt to fix the Windows build after r195799"
http://trac.webkit.org/changeset/195828

Location:
trunk
Files:
64 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195913 r195916  
     12016-01-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r195799 and r195828.
     4        https://bugs.webkit.org/show_bug.cgi?id=153722
     5
     6        Caused assertion failures, severely affecting EWS (Requested
     7        by ap on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Web Inspector: InspectorTimelineAgent doesn't need to
     12        recompile functions because it now uses the sampling profiler"
     13        https://bugs.webkit.org/show_bug.cgi?id=153500
     14        http://trac.webkit.org/changeset/195799
     15
     16        "Attempt to fix the Windows build after r195799"
     17        http://trac.webkit.org/changeset/195828
     18
    1192016-01-30  Brady Eidson  <beidson@apple.com>
    220
  • trunk/LayoutTests/fast/profiler/anonymous-event-handler.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/anonymous-function-called-from-different-contexts.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/anonymous-function-calls-built-in-functions.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/anonymous-function-calls-eval.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/anonymous-functions-with-display-names.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function anonymousFunctionGenerator(iterations)
  • trunk/LayoutTests/fast/profiler/apply.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/built-in-function-calls-anonymous.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/built-in-function-calls-user-defined-function.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/call-register-leak.html

    r195799 r195916  
    55    testRunner.dumpAsText();
    66if (window.internals)
    7     internals.setLegacyJavaScriptProfilingEnabled(true);
     7    internals.setJavaScriptProfilingEnabled(true);
    88
    99function log(s)
  • trunk/LayoutTests/fast/profiler/call.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/compare-multiple-profiles.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010var j = 0;
  • trunk/LayoutTests/fast/profiler/constructor.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/dead-time.html

    r195799 r195916  
    88}
    99if (window.internals)
    10     internals.setLegacyJavaScriptProfilingEnabled(true);
     10    internals.setJavaScriptProfilingEnabled(true);
    1111
    1212function startTest()
  • trunk/LayoutTests/fast/profiler/document-dot-write.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/event-handler.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/execution-context-and-eval-on-same-line.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/inline-event-handler.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/many-calls-in-the-same-scope.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/multiple-and-different-scoped-anonymous-function-calls.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/multiple-and-different-scoped-function-calls.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/multiple-anonymous-functions-called-from-the-same-function.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/multiple-frames.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/named-functions-with-display-names.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function function0()
  • trunk/LayoutTests/fast/profiler/nested-anonymous-functon.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/nested-start-and-stop-profiler.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/no-execution-context.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99</script>
    1010</head>
  • trunk/LayoutTests/fast/profiler/one-execution-context.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/profile-calls-in-included-file.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/profile-with-no-title.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/profiling-from-a-nested-location.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/simple-event-call.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/simple-no-level-change.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/start-and-stop-profiler-multiple-times.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/start-and-stop-profiling-in-the-same-function.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/start-but-dont-stop-profiling.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout.html

    r195799 r195916  
    88}
    99if (window.internals)
    10     internals.setLegacyJavaScriptProfilingEnabled(true);
     10    internals.setJavaScriptProfilingEnabled(true);
    1111
    1212function startTest()
  • trunk/LayoutTests/fast/profiler/stop-then-function-call.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010var j = 0;
  • trunk/LayoutTests/fast/profiler/throw-exception-from-eval.html-disabled

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.settings.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.settings.setJavaScriptProfilingEnabled(true);
    99
    1010console.profile("Throw within an eval.");
  • trunk/LayoutTests/fast/profiler/two-execution-contexts.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/user-defined-function-calls-built-in-functions.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/fast/profiler/window-dot-eval.html

    r195799 r195916  
    66    testRunner.dumpAsText();
    77if (window.internals)
    8     internals.setLegacyJavaScriptProfilingEnabled(true);
     8    internals.setJavaScriptProfilingEnabled(true);
    99
    1010function startTest()
  • trunk/LayoutTests/inspector/sampling-profiler/eval-source-url.html

    r195799 r195916  
    2222
    2323function bar() {
    24     eval("//# sourceURL=eval.js\nfoo();");
     24    for (let i = 0; i < 2; i++)
     25        eval("//# sourceURL=eval.js\nfoo();");
    2526}
    2627noInline(bar);
  • trunk/Source/JavaScriptCore/ChangeLog

    r195906 r195916  
     12016-01-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r195799 and r195828.
     4        https://bugs.webkit.org/show_bug.cgi?id=153722
     5
     6        Caused assertion failures, severely affecting EWS (Requested
     7        by ap on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Web Inspector: InspectorTimelineAgent doesn't need to
     12        recompile functions because it now uses the sampling profiler"
     13        https://bugs.webkit.org/show_bug.cgi?id=153500
     14        http://trac.webkit.org/changeset/195799
     15
     16        "Attempt to fix the Windows build after r195799"
     17        http://trac.webkit.org/changeset/195828
     18
    1192016-01-30  Yusuke Suzuki  <utatane.tea@gmail.com>
    220
  • trunk/Source/JavaScriptCore/jsc.cpp

    r195865 r195916  
    778778
    779779const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, nullptr, CREATE_METHOD_TABLE(GlobalObject) };
    780 const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, nullptr };
     780const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, nullptr };
    781781
    782782
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r195876 r195916  
    299299    ParserError error;
    300300    DebuggerMode debuggerMode = globalObject->hasDebugger() ? DebuggerOn : DebuggerOff;
    301     ProfilerMode profilerMode = globalObject->hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
     301    ProfilerMode profilerMode = globalObject->hasProfiler() ? ProfilerOn : ProfilerOff;
    302302    UnlinkedFunctionCodeBlock* unlinkedCodeBlock =
    303303        executable->m_unlinkedExecutable->unlinkedCodeBlockFor(
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r195878 r195916  
    174174const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, &globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };
    175175
    176 const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, nullptr, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr };
     176const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, nullptr, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr };
    177177
    178178/* Source for JSGlobalObject.lut.h
     
    613613}
    614614
    615 bool JSGlobalObject::hasLegacyProfiler() const
    616 {
    617     return globalObjectMethodTable()->supportsLegacyProfiling(this);
     615bool JSGlobalObject::hasProfiler() const
     616{
     617    if (m_debugger && m_debugger->hasProfilingClient())
     618        return true;
     619
     620    return globalObjectMethodTable()->supportsProfiling(this);
    618621}
    619622
     
    977980    JSParserStrictMode strictMode = executable->isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
    978981    DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
    979     ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
     982    ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
    980983    UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()->getProgramCodeBlock(
    981984        vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, strictMode,
     
    9981001    JSParserStrictMode strictMode = executable->isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
    9991002    DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
    1000     ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
     1003    ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
    10011004    UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()->getEvalCodeBlock(
    10021005        vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, strictMode, thisTDZMode, isArrowFunctionContext, debuggerMode, profilerMode, error, variablesUnderTDZ);
     
    10171020    ParserError error;
    10181021    DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
    1019     ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
     1022    ProfilerMode profilerMode = hasProfiler() ? ProfilerOn : ProfilerOff;
    10201023    UnlinkedModuleProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()->getModuleProgramCodeBlock(
    10211024        vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, debuggerMode, profilerMode, error);
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r195799 r195916  
    142142    AllowsAccessFromFunctionPtr allowsAccessFrom;
    143143
    144     typedef bool (*SupportsLegacyProfilingFunctionPtr)(const JSGlobalObject*);
    145     SupportsLegacyProfilingFunctionPtr supportsLegacyProfiling;
     144    typedef bool (*SupportsProfilingFunctionPtr)(const JSGlobalObject*);
     145    SupportsProfilingFunctionPtr supportsProfiling;
    146146
    147147    typedef bool (*SupportsRichSourceInfoFunctionPtr)(const JSGlobalObject*);
     
    361361
    362362    bool hasDebugger() const { return m_debugger; }
    363     bool hasLegacyProfiler() const;
     363    bool hasProfiler() const;
    364364    const RuntimeFlags& runtimeFlags() const { return m_runtimeFlags; }
    365365
     
    620620
    621621    static bool allowsAccessFrom(const JSGlobalObject*, ExecState*) { return true; }
    622     static bool supportsLegacyProfiling(const JSGlobalObject*) { return false; }
     622    static bool supportsProfiling(const JSGlobalObject*) { return false; }
    623623    static bool supportsRichSourceInfo(const JSGlobalObject*) { return true; }
    624624
  • trunk/Source/WebCore/ChangeLog

    r195913 r195916  
     12016-01-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r195799 and r195828.
     4        https://bugs.webkit.org/show_bug.cgi?id=153722
     5
     6        Caused assertion failures, severely affecting EWS (Requested
     7        by ap on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Web Inspector: InspectorTimelineAgent doesn't need to
     12        recompile functions because it now uses the sampling profiler"
     13        https://bugs.webkit.org/show_bug.cgi?id=153500
     14        http://trac.webkit.org/changeset/195799
     15
     16        "Attempt to fix the Windows build after r195799"
     17        http://trac.webkit.org/changeset/195828
     18
    1192016-01-30  Brady Eidson  <beidson@apple.com>
    220
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r195799 r195916  
    6464const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) };
    6565
    66 const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, &moduleLoaderEvaluate };
     66const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, &moduleLoaderEvaluate };
    6767
    6868JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
     
    116116}
    117117
    118 bool JSDOMWindowBase::supportsLegacyProfiling(const JSGlobalObject* object)
     118bool JSDOMWindowBase::supportsProfiling(const JSGlobalObject* object)
    119119{
    120120    const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object);
     
    127127        return false;
    128128
    129     return page->inspectorController().legacyProfilerEnabled();
     129    return page->inspectorController().profilerEnabled();
    130130}
    131131
     
    143143    bool enabled = page->inspectorController().enabled();
    144144    ASSERT(enabled || !thisObject->debugger());
    145     ASSERT(enabled || !supportsLegacyProfiling(thisObject));
     145    ASSERT(enabled || !supportsProfiling(thisObject));
    146146    return enabled;
    147147}
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h

    r195799 r195916  
    6161        static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
    6262
    63         static bool supportsLegacyProfiling(const JSC::JSGlobalObject*);
     63        static bool supportsProfiling(const JSC::JSGlobalObject*);
    6464        static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
    6565        static bool shouldInterruptScript(const JSC::JSGlobalObject*);
  • trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp

    r195799 r195916  
    4444const ClassInfo JSWorkerGlobalScopeBase::s_info = { "WorkerGlobalScope", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) };
    4545
    46 const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr };
     46const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr };
    4747
    4848JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<WorkerGlobalScope> impl)
     
    7373}
    7474
    75 bool JSWorkerGlobalScopeBase::supportsLegacyProfiling(const JSGlobalObject* object)
     75bool JSWorkerGlobalScopeBase::supportsProfiling(const JSGlobalObject* object)
    7676{
    77     return JSGlobalObject::supportsLegacyProfiling(object);
     77    return JSGlobalObject::supportsProfiling(object);
    7878}
    7979
  • trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h

    r195799 r195916  
    5454
    5555        static bool allowsAccessFrom(const JSC::JSGlobalObject*, JSC::ExecState*);
    56         static bool supportsLegacyProfiling(const JSC::JSGlobalObject*);
     56        static bool supportsProfiling(const JSC::JSGlobalObject*);
    5757        static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
    5858        static bool shouldInterruptScript(const JSC::JSGlobalObject*);
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r195799 r195916  
    404404}
    405405
    406 bool InspectorController::legacyProfilerEnabled() const
    407 {
    408     return m_legacyProfilerEnabled;
    409 }
    410 
    411 void InspectorController::setLegacyProfilerEnabled(bool enable)
    412 {
    413     m_legacyProfilerEnabled = enable;
    414 
    415     m_instrumentingAgents->setPersistentInspectorTimelineAgent(enable ? m_timelineAgent : nullptr);
    416     m_scriptDebugServer.recompileAllJSFunctions();
     406bool InspectorController::profilerEnabled() const
     407{
     408    return m_instrumentingAgents->persistentInspectorTimelineAgent();
     409}
     410
     411void InspectorController::setProfilerEnabled(bool enable)
     412{
     413    ErrorString unused;
     414
     415    if (enable) {
     416        m_instrumentingAgents->setPersistentInspectorTimelineAgent(m_timelineAgent);
     417        m_timelineAgent->start(unused);
     418    } else {
     419        m_instrumentingAgents->setPersistentInspectorTimelineAgent(nullptr);
     420        m_timelineAgent->stop(unused);
     421    }
    417422}
    418423
  • trunk/Source/WebCore/inspector/InspectorController.h

    r195799 r195916  
    112112    WEBCORE_EXPORT void evaluateForTestInFrontend(const String& script);
    113113
    114     WEBCORE_EXPORT bool legacyProfilerEnabled() const;
    115     WEBCORE_EXPORT void setLegacyProfilerEnabled(bool);
     114    WEBCORE_EXPORT bool profilerEnabled() const;
     115    WEBCORE_EXPORT void setProfilerEnabled(bool);
    116116
    117117    InspectorClient* inspectorClient() const { return m_inspectorClient; }
     
    152152    bool m_isUnderTest { false };
    153153    bool m_isAutomaticInspection { false };
    154     bool m_legacyProfilerEnabled { false };
    155154};
    156155
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp

    r195799 r195916  
    8585{
    8686    m_instrumentingAgents.setPersistentInspectorTimelineAgent(this);
    87 }
    88 
    89 void InspectorTimelineAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
     87
     88    // Recompile to include profiling information.
     89    // FIXME: This doesn't seem like the most appropriate place.
     90    m_environment.scriptDebugServer().recompileAllJSFunctions();
     91}
     92
     93void InspectorTimelineAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason reason)
    9094{
    9195    m_instrumentingAgents.setPersistentInspectorTimelineAgent(nullptr);
     96
     97    if (reason != Inspector::DisconnectReason::InspectedTargetDestroyed)
     98        m_environment.scriptDebugServer().recompileAllJSFunctions();
    9299
    93100    ErrorString unused;
     
    197204}
    198205
     206static inline void startProfiling(JSC::ExecState* exec, const String& title, RefPtr<Stopwatch>&& stopwatch)
     207{
     208    JSC::LegacyProfiler::profiler()->startProfiling(exec, title, WTFMove(stopwatch));
     209}
     210
     211static inline RefPtr<JSC::Profile> stopProfiling(JSC::ExecState* exec, const String& title)
     212{
     213    return JSC::LegacyProfiler::profiler()->stopProfiling(exec, title);
     214}
     215
    199216void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String &title)
    200217{
    201     // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
    202 
    203218    // Only allow recording of a profile if it is anonymous (empty title) or does not match
    204219    // the title of an already recording profile.
     
    215230        internalStart();
    216231
    217     JSC::LegacyProfiler::profiler()->startProfiling(exec, title, m_environment.executionStopwatch());
     232    startProfiling(exec, title, m_environment.executionStopwatch());
    218233
    219234    m_pendingConsoleProfileRecords.append(createRecordEntry(TimelineRecordFactory::createConsoleProfileData(title), TimelineRecordType::ConsoleProfile, true, frameFromExecState(exec)));
     
    222237RefPtr<JSC::Profile> InspectorTimelineAgent::stopFromConsole(JSC::ExecState* exec, const String& title)
    223238{
    224     // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
    225 
    226239    // Stop profiles in reverse order. If the title is empty, then stop the last profile.
    227240    // Otherwise, match the title of the profile to stop.
     
    233246
    234247        if (title.isEmpty() || recordTitle == title) {
    235             RefPtr<JSC::Profile> profile = JSC::LegacyProfiler::profiler()->stopProfiling(exec, title);
     248            RefPtr<JSC::Profile> profile = stopProfiling(exec, title);
    236249            if (profile)
    237250                TimelineRecordFactory::appendProfile(record.data.get(), profile.copyRef());
  • trunk/Source/WebCore/page/PageConsoleClient.cpp

    r195799 r195916  
    185185void PageConsoleClient::profile(JSC::ExecState* exec, const String& title)
    186186{
    187     // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
    188187    InspectorInstrumentation::startProfiling(m_page, exec, title);
    189188}
     
    191190void PageConsoleClient::profileEnd(JSC::ExecState* exec, const String& title)
    192191{
    193     // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
    194192    if (RefPtr<JSC::Profile> profile = InspectorInstrumentation::stopProfiling(m_page, exec, title))
    195193        m_profiles.append(WTFMove(profile));
  • trunk/Source/WebCore/testing/Internals.cpp

    r195799 r195916  
    373373    WebCore::overrideUserPreferredLanguages(Vector<String>());
    374374    WebCore::Settings::setUsesOverlayScrollbars(false);
    375     page->inspectorController().setLegacyProfilerEnabled(false);
     375    page->inspectorController().setProfilerEnabled(false);
    376376#if ENABLE(VIDEO_TRACK)
    377377    page->group().captionPreferences()->setCaptionsStyleSheetOverride(emptyString());
     
    18401840}
    18411841
    1842 void Internals::setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec)
     1842void Internals::setJavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec)
    18431843{
    18441844    Page* page = contextDocument()->frame()->page();
     
    18481848    }
    18491849
    1850     page->inspectorController().setLegacyProfilerEnabled(enabled);
     1850    page->inspectorController().setProfilerEnabled(enabled);
    18511851}
    18521852
  • trunk/Source/WebCore/testing/Internals.h

    r195799 r195916  
    279279    RefPtr<DOMWindow> openDummyInspectorFrontend(const String& url);
    280280    void closeDummyInspectorFrontend();
    281     void setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
     281    void setJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
    282282    void setInspectorIsUnderTest(bool isUnderTest, ExceptionCode&);
    283283
  • trunk/Source/WebCore/testing/Internals.idl

    r195799 r195916  
    264264    DOMWindow openDummyInspectorFrontend(DOMString url);
    265265    void closeDummyInspectorFrontend();
    266     [RaisesException] void setLegacyJavaScriptProfilingEnabled(boolean enabled);
     266    [RaisesException] void setJavaScriptProfilingEnabled(boolean creates);
    267267    [RaisesException] void setInspectorIsUnderTest(boolean isUnderTest);
    268268
  • trunk/Source/WebKit/win/ChangeLog

    r195911 r195916  
     12016-01-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r195799 and r195828.
     4        https://bugs.webkit.org/show_bug.cgi?id=153722
     5
     6        Caused assertion failures, severely affecting EWS (Requested
     7        by ap on #webkit).
     8
     9        Reverted changesets:
     10
     11        "Web Inspector: InspectorTimelineAgent doesn't need to
     12        recompile functions because it now uses the sampling profiler"
     13        https://bugs.webkit.org/show_bug.cgi?id=153500
     14        http://trac.webkit.org/changeset/195799
     15
     16        "Attempt to fix the Windows build after r195799"
     17        http://trac.webkit.org/changeset/195828
     18
    1192016-01-30  Darin Adler  <darin@apple.com>
    220
  • trunk/Source/WebKit/win/WebInspector.cpp

    r195828 r195916  
    217217        return S_OK;
    218218
    219     *isProfilingEnabled = inspectedPage->inspectorController().legacyProfilerEnabled();
     219    *isProfilingEnabled = inspectedPage->inspectorController().profilerEnabled();
    220220    return S_OK;
    221221}
     
    230230        return S_OK;
    231231
    232     inspectedPage->inspectorController().setLegacyProfilerEnabled(enabled);
     232    inspectedPage->inspectorController().setProfilerEnabled(enabled);
    233233
    234234    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.