<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[198648] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/198648">198648</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2016-03-24 15:43:06 -0700 (Thu, 24 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Separate Debugger enable state from the debugger breakpoints enabled state
https://bugs.webkit.org/show_bug.cgi?id=152193
&lt;rdar://problem/23867520&gt;

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When all breakpoints are disabled, we can recompile all JS
code and remove the necessary debugging code that is emitted.
This allows for the code that is executing to be almost as fast
as it is with the debugger completely disabled. This is in preparation for:
https://bugs.webkit.org/show_bug.cgi?id=155809
which will introduce a high fidelity profiler. That profiler
could be built off the principle that breakpoints are disabled
when we're performing a high fidelity profile. Doing so, for example,
allows the sampling profiler to better measure the real performance
of the JS of a particular application.

* debugger/Debugger.cpp:
(JSC::Debugger::setBreakpointsActivated):
(JSC::Debugger::setPauseOnExceptionsState):
* debugger/Debugger.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::attachDebugger):
(Inspector::JSGlobalObjectScriptDebugServer::detachDebugger):
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::enable):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock):
(JSC::JSGlobalObject::createModuleProgramCodeBlock):
(JSC::JSGlobalObject::queueMicrotask):
(JSC::JSGlobalObject::hasDebugger):
(JSC::JSGlobalObject::hasInteractiveDebugger):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::runtimeFlags):
(JSC::JSGlobalObject::hasDebugger): Deleted.

Source/WebCore:

No new tests because this is already tested by inspector tests.

* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::attachDebugger):
(WebCore::PageScriptDebugServer::detachDebugger):

LayoutTests:

* inspector/script-profiler/event-type-API.html:
* inspector/script-profiler/event-type-Microtask.html:
* inspector/script-profiler/event-type-Other.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorscriptprofilereventtypeAPIhtml">trunk/LayoutTests/inspector/script-profiler/event-type-API.html</a></li>
<li><a href="#trunkLayoutTestsinspectorscriptprofilereventtypeMicrotaskhtml">trunk/LayoutTests/inspector/script-profiler/event-type-Microtask.html</a></li>
<li><a href="#trunkLayoutTestsinspectorscriptprofilereventtypeOtherhtml">trunk/LayoutTests/inspector/script-profiler/event-type-Other.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggercpp">trunk/Source/JavaScriptCore/debugger/Debugger.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggerh">trunk/Source/JavaScriptCore/debugger/Debugger.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphcpp">trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSGlobalObjectScriptDebugServercpp">trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeExecutablecpp">trunk/Source/JavaScriptCore/runtime/Executable.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageScriptDebugServercpp">trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/LayoutTests/ChangeLog        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-24  Saam barati  &lt;sbarati@apple.com&gt;
+
+        Web Inspector: Separate Debugger enable state from the debugger breakpoints enabled state
+        https://bugs.webkit.org/show_bug.cgi?id=152193
+        &lt;rdar://problem/23867520&gt;
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/script-profiler/event-type-API.html:
+        * inspector/script-profiler/event-type-Microtask.html:
+        * inspector/script-profiler/event-type-Other.html:
+
</ins><span class="cx"> 2016-03-24  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update expected results following &lt;http://trac.webkit.org/changeset/198591&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorscriptprofilereventtypeAPIhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/script-profiler/event-type-API.html (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/script-profiler/event-type-API.html        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/LayoutTests/inspector/script-profiler/event-type-API.html        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    // FIXME: &lt;https://webkit.org/b/152193&gt; Web Inspector: Separate Debugger enable state from being attached
</del><ins>+    // FIXME: &lt;https://webkit.org/b/155851&gt; Web Inspector: We should separate out attaching the debugger from the Debugger.enable event
</ins><span class="cx">     // Debugger should not need to be enabled for profiling to work.
</span><span class="cx">     InspectorProtocol.sendCommand(&quot;Debugger.enable&quot;, {});
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorscriptprofilereventtypeMicrotaskhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/script-profiler/event-type-Microtask.html (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/script-profiler/event-type-Microtask.html        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/LayoutTests/inspector/script-profiler/event-type-Microtask.html        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    // FIXME: &lt;https://webkit.org/b/152193&gt; Web Inspector: Separate Debugger enable state from being attached
</del><ins>+    // FIXME: &lt;https://webkit.org/b/155851&gt; Web Inspector: We should separate out attaching the debugger from the Debugger.enable event
</ins><span class="cx">     // Debugger should not need to be enabled for profiling to work.
</span><span class="cx">     InspectorProtocol.sendCommand(&quot;Debugger.enable&quot;, {});
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorscriptprofilereventtypeOtherhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/script-profiler/event-type-Other.html (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/script-profiler/event-type-Other.html        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/LayoutTests/inspector/script-profiler/event-type-Other.html        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    // FIXME: &lt;https://webkit.org/b/152193&gt; Web Inspector: Separate Debugger enable state from being attached
</del><ins>+    // FIXME: &lt;https://webkit.org/b/155851&gt; Web Inspector: We should separate out attaching the debugger from the Debugger.enable event
</ins><span class="cx">     // Debugger should not need to be enabled for profiling to work.
</span><span class="cx">     InspectorProtocol.sendCommand(&quot;Debugger.enable&quot;, {});
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-03-24  Saam barati  &lt;sbarati@apple.com&gt;
+
+        Web Inspector: Separate Debugger enable state from the debugger breakpoints enabled state
+        https://bugs.webkit.org/show_bug.cgi?id=152193
+        &lt;rdar://problem/23867520&gt;
+
+        Reviewed by Joseph Pecoraro.
+
+        When all breakpoints are disabled, we can recompile all JS
+        code and remove the necessary debugging code that is emitted.
+        This allows for the code that is executing to be almost as fast
+        as it is with the debugger completely disabled. This is in preparation for:
+        https://bugs.webkit.org/show_bug.cgi?id=155809
+        which will introduce a high fidelity profiler. That profiler
+        could be built off the principle that breakpoints are disabled
+        when we're performing a high fidelity profile. Doing so, for example,
+        allows the sampling profiler to better measure the real performance
+        of the JS of a particular application.
+
+        * debugger/Debugger.cpp:
+        (JSC::Debugger::setBreakpointsActivated):
+        (JSC::Debugger::setPauseOnExceptionsState):
+        * debugger/Debugger.h:
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::Graph):
+        * inspector/JSGlobalObjectScriptDebugServer.cpp:
+        (Inspector::JSGlobalObjectScriptDebugServer::attachDebugger):
+        (Inspector::JSGlobalObjectScriptDebugServer::detachDebugger):
+        * inspector/agents/InspectorDebuggerAgent.cpp:
+        (Inspector::InspectorDebuggerAgent::enable):
+        * runtime/Executable.cpp:
+        (JSC::ScriptExecutable::newCodeBlockFor):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::createProgramCodeBlock):
+        (JSC::JSGlobalObject::createEvalCodeBlock):
+        (JSC::JSGlobalObject::createModuleProgramCodeBlock):
+        (JSC::JSGlobalObject::queueMicrotask):
+        (JSC::JSGlobalObject::hasDebugger):
+        (JSC::JSGlobalObject::hasInteractiveDebugger):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::runtimeFlags):
+        (JSC::JSGlobalObject::hasDebugger): Deleted.
+
</ins><span class="cx"> 2016-03-24  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Create private builtin helper advanceStringIndexUnicode() for use by RegExp builtins
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -528,7 +528,11 @@
</span><span class="cx"> 
</span><span class="cx"> void Debugger::setBreakpointsActivated(bool activated)
</span><span class="cx"> {
</span><ins>+    if (activated == m_breakpointsActivated)
+        return;
+
</ins><span class="cx">     m_breakpointsActivated = activated;
</span><ins>+    recompileAllJSFunctions();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Debugger::setPauseOnExceptionsState(PauseOnExceptionsState pause)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.h (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.h        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.h        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -62,7 +62,8 @@
</span><span class="cx">         return m_currentException;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool needsExceptionCallbacks() const { return m_pauseOnExceptionsState != DontPauseOnExceptions; }
</del><ins>+    bool needsExceptionCallbacks() const { return m_breakpointsActivated &amp;&amp; m_pauseOnExceptionsState != DontPauseOnExceptions; }
+    bool isInteractivelyDebugging() const { return m_breakpointsActivated; }
</ins><span class="cx"> 
</span><span class="cx">     enum ReasonForDetach {
</span><span class="cx">         TerminatingDebuggingSession,
</span><span class="lines">@@ -75,7 +76,6 @@
</span><span class="cx">     BreakpointID setBreakpoint(Breakpoint, unsigned&amp; actualLine, unsigned&amp; actualColumn);
</span><span class="cx">     void removeBreakpoint(BreakpointID);
</span><span class="cx">     void clearBreakpoints();
</span><del>-    void setBreakpointsActivated(bool);
</del><span class="cx">     void activateBreakpoints() { setBreakpointsActivated(true); }
</span><span class="cx">     void deactivateBreakpoints() { setBreakpointsActivated(false); }
</span><span class="cx"> 
</span><span class="lines">@@ -199,6 +199,7 @@
</span><span class="cx">         BreakpointDisabled,
</span><span class="cx">         BreakpointEnabled
</span><span class="cx">     };
</span><ins>+    void setBreakpointsActivated(bool);
</ins><span class="cx">     void toggleBreakpoint(CodeBlock*, Breakpoint&amp;, BreakpointState);
</span><span class="cx">     void applyBreakpoints(CodeBlock*);
</span><span class="cx">     void toggleBreakpoint(Breakpoint&amp;, BreakpointState);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_profiledBlock);
</span><span class="cx">     
</span><del>-    m_hasDebuggerEnabled = m_profiledBlock-&gt;globalObject()-&gt;hasDebugger()
</del><ins>+    m_hasDebuggerEnabled = m_profiledBlock-&gt;globalObject()-&gt;hasInteractiveDebugger()
</ins><span class="cx">         || Options::forceDebuggerBytecodeGeneration();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSGlobalObjectScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> void JSGlobalObjectScriptDebugServer::attachDebugger()
</span><span class="cx"> {
</span><span class="cx">     attach(&amp;m_globalObject);
</span><del>-    recompileAllJSFunctions();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSGlobalObjectScriptDebugServer::detachDebugger(bool isBeingDestroyed)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -88,7 +88,6 @@
</span><span class="cx">     if (m_enabled)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_scriptDebugServer.setBreakpointsActivated(true);
</del><span class="cx">     m_scriptDebugServer.addListener(this);
</span><span class="cx"> 
</span><span class="cx">     if (m_listener)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeExecutablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Executable.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Executable.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/runtime/Executable.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx">     RELEASE_ASSERT(!executable-&gt;codeBlockFor(kind));
</span><span class="cx">     JSGlobalObject* globalObject = scope-&gt;globalObject();
</span><span class="cx">     ParserError error;
</span><del>-    DebuggerMode debuggerMode = globalObject-&gt;hasDebugger() ? DebuggerOn : DebuggerOff;
</del><ins>+    DebuggerMode debuggerMode = globalObject-&gt;hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
</ins><span class="cx">     ProfilerMode profilerMode = globalObject-&gt;hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
</span><span class="cx">     UnlinkedFunctionCodeBlock* unlinkedCodeBlock = 
</span><span class="cx">         executable-&gt;m_unlinkedExecutable-&gt;unlinkedCodeBlockFor(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -1000,7 +1000,7 @@
</span><span class="cx"> {
</span><span class="cx">     ParserError error;
</span><span class="cx">     JSParserStrictMode strictMode = executable-&gt;isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</span><del>-    DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</del><ins>+    DebuggerMode debuggerMode = hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
</ins><span class="cx">     ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
</span><span class="cx">     UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getProgramCodeBlock(
</span><span class="cx">         vm(), executable, executable-&gt;source(), JSParserBuiltinMode::NotBuiltin, strictMode, 
</span><span class="lines">@@ -1021,7 +1021,7 @@
</span><span class="cx"> {
</span><span class="cx">     ParserError error;
</span><span class="cx">     JSParserStrictMode strictMode = executable-&gt;isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict;
</span><del>-    DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</del><ins>+    DebuggerMode debuggerMode = hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
</ins><span class="cx">     ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
</span><span class="cx">     UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getEvalCodeBlock(
</span><span class="cx">         vm(), executable, executable-&gt;source(), JSParserBuiltinMode::NotBuiltin, strictMode, thisTDZMode, isArrowFunctionContext, debuggerMode, profilerMode, error, variablesUnderTDZ);
</span><span class="lines">@@ -1040,7 +1040,7 @@
</span><span class="cx"> UnlinkedModuleProgramCodeBlock* JSGlobalObject::createModuleProgramCodeBlock(CallFrame* callFrame, ModuleProgramExecutable* executable)
</span><span class="cx"> {
</span><span class="cx">     ParserError error;
</span><del>-    DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff;
</del><ins>+    DebuggerMode debuggerMode = hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
</ins><span class="cx">     ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff;
</span><span class="cx">     UnlinkedModuleProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()-&gt;getModuleProgramCodeBlock(
</span><span class="cx">         vm(), executable, executable-&gt;source(), JSParserBuiltinMode::NotBuiltin, debuggerMode, profilerMode, error);
</span><span class="lines">@@ -1152,4 +1152,14 @@
</span><span class="cx">     vm().queueMicrotask(this, task);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool JSGlobalObject::hasDebugger() const
+{ 
+    return m_debugger;
+}
+
+bool JSGlobalObject::hasInteractiveDebugger() const 
+{ 
+    return m_debugger &amp;&amp; m_debugger-&gt;isInteractivelyDebugging();
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -368,7 +368,8 @@
</span><span class="cx"> 
</span><span class="cx">     DECLARE_EXPORT_INFO;
</span><span class="cx"> 
</span><del>-    bool hasDebugger() const { return m_debugger; }
</del><ins>+    bool hasDebugger() const;
+    bool hasInteractiveDebugger() const;
</ins><span class="cx">     bool hasLegacyProfiler() const;
</span><span class="cx">     const RuntimeFlags&amp; runtimeFlags() const { return m_runtimeFlags; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/WebCore/ChangeLog        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-03-24  Saam barati  &lt;sbarati@apple.com&gt;
+
+        Web Inspector: Separate Debugger enable state from the debugger breakpoints enabled state
+        https://bugs.webkit.org/show_bug.cgi?id=152193
+        &lt;rdar://problem/23867520&gt;
+
+        Reviewed by Joseph Pecoraro.
+
+        No new tests because this is already tested by inspector tests.
+
+        * inspector/PageScriptDebugServer.cpp:
+        (WebCore::PageScriptDebugServer::attachDebugger):
+        (WebCore::PageScriptDebugServer::detachDebugger):
+
</ins><span class="cx"> 2016-03-24  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [MSE] Make calling HTMLMediaElement.buffered less expensive
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp (198647 => 198648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp        2016-03-24 22:35:35 UTC (rev 198647)
+++ trunk/Source/WebCore/inspector/PageScriptDebugServer.cpp        2016-03-24 22:43:06 UTC (rev 198648)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx"> void PageScriptDebugServer::attachDebugger()
</span><span class="cx"> {
</span><span class="cx">     m_page.setDebugger(this);
</span><del>-    recompileAllJSFunctions();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageScriptDebugServer::detachDebugger(bool isBeingDestroyed)
</span></span></pre>
</div>
</div>

</body>
</html>