<!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>[162799] 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/162799">162799</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2014-01-26 00:39:12 -0800 (Sun, 26 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Move InspectorDebuggerAgent into JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=127629

Rubber-stamped by Sam Weinig.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
- Add new files to the build.
- Also, since non REMOTE_INSPECTOR ports cannot yet connect to a
  JSGlobalObject for inspection remove those files as they don't
  need to be built.

* inspector/EventLoop.cpp: Added.
(Inspector::EventLoop::cycle):
* inspector/EventLoop.h: Added.
(Inspector::EventLoop::EventLoop):
(Inspector::EventLoop::ended):
Add a JavaScriptCore version of EventLoop. This is currently only
used by the Mac port for JSGlobalObject remote inspection. Keep
the WebCore/platform version alive because for the Mac port it does
slightly different things involving AppKit.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
Create DebuggerAgent and hook up ScriptDebugServer where needed.

* inspector/JSGlobalObjectScriptDebugServer.cpp: Added.
(Inspector::JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer):
(Inspector::JSGlobalObjectScriptDebugServer::addListener):
(Inspector::JSGlobalObjectScriptDebugServer::removeListener):
(Inspector::JSGlobalObjectScriptDebugServer::recompileAllJSFunctions):
(Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):
* inspector/JSGlobalObjectScriptDebugServer.h: Added.
Simple implementation of ScriptDebugServer with a JSGlobalObject.

* inspector/agents/InspectorDebuggerAgent.cpp: Renamed from Source/WebCore/inspector/InspectorDebuggerAgent.cpp.
* inspector/agents/InspectorDebuggerAgent.h: Renamed from Source/WebCore/inspector/InspectorDebuggerAgent.h.
Copied from WebCore. A few methods need to be made virtual so that Web implementations
can override and extend the funcitonality. E.g. sourceMapURLForScript and enable/disable.

* inspector/agents/JSGlobalObjectDebuggerAgent.cpp: Added.
* inspector/agents/JSGlobalObjectDebuggerAgent.h: Added.
(Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent):
(Inspector::JSGlobalObjectDebuggerAgent::startListeningScriptDebugServer):
(Inspector::JSGlobalObjectDebuggerAgent::stopListeningScriptDebugServer):
(Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval):
Simple implementation of DebuggerAGent with a JSGlobalObject.

Source/WebCore:

Test: inspector-protocol/debugger/pause-on-assert.html

* CMakeLists.txt:
* ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h: Added.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
- Remove InspectorDebuggerAgent.
- Add WebDebuggerAgent (shared between Page and Worker).

* inspector/WebDebuggerAgent.h: Added.
(WebCore::WebDebuggerAgent::~WebDebuggerAgent):
* inspector/WebDebuggerAgent.cpp: Added.
(WebCore::WebDebuggerAgent::WebDebuggerAgent):
(WebCore::WebDebuggerAgent::enable):
(WebCore::WebDebuggerAgent::disable):
Shared code for Page and Worker debugger agents.
Instrumenting agents is a concept in WebCore only,
and the Debugger agent is only in the instrumenting
agents list when it is enabled and removed when disabled.

* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::inspectorDebuggerAgent):
(WebCore::InstrumentingAgents::setInspectorDebuggerAgent):
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
Update namespace for debugger agent.

* inspector/InspectorInstrumentation.cpp:
(WebCore::isConsoleAssertMessage):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
DebuggerAgent in JavaScriptCore does not yet know about console
types. So temporarily handle it here. We need to give JavaScriptCore
some concept of Console messages and types.

* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::PageDebuggerAgent):
(WebCore::PageDebuggerAgent::enable):
(WebCore::PageDebuggerAgent::disable):
(WebCore::PageDebuggerAgent::sourceMapURLForScript):
(WebCore::PageDebuggerAgent::injectedScriptForEval):
* inspector/PageDebuggerAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::injectedScriptForEval):
* inspector/WorkerDebuggerAgent.h:
Modernize the Page and Worker debugger agents.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
New constructors for the debugger agents.

LayoutTests:

Add a test that we pause in the debugger for console.assert failures
when the DebuggerAgent is enabled.

* inspector-protocol/debugger/pause-on-assert-expected.txt: Added.
* inspector-protocol/debugger/pause-on-assert.html: Added.
* inspector-protocol/debugger/resources/assert.js: Added.
(assertTrue):
(assertFalse):
(assertCondition):
(assertConditionWithMessage):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreGNUmakefilelistam">trunk/Source/JavaScriptCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSGlobalObjectInspectorControllercpp">trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorAllInOnecpp">trunk/Source/WebCore/inspector/InspectorAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllerh">trunk/Source/WebCore/inspector/InspectorController.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMDebuggerAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMDebuggerAgenth">trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationcpp">trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInstrumentingAgentsh">trunk/Source/WebCore/inspector/InstrumentingAgents.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageDebuggerAgentcpp">trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorPageDebuggerAgenth">trunk/Source/WebCore/inspector/PageDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorWorkerDebuggerAgentcpp">trunk/Source/WebCore/inspector/WorkerDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorWorkerDebuggerAgenth">trunk/Source/WebCore/inspector/WorkerDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorWorkerInspectorControllercpp">trunk/Source/WebCore/inspector/WorkerInspectorController.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsinspectorprotocoldebuggerpauseonassertexpectedtxt">trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldebuggerpauseonasserthtml">trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert.html</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldebuggerresourcesassertjs">trunk/LayoutTests/inspector-protocol/debugger/resources/assert.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorEventLoopcpp">trunk/Source/JavaScriptCore/inspector/EventLoop.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorEventLooph">trunk/Source/JavaScriptCore/inspector/EventLoop.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSGlobalObjectScriptDebugServercpp">trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSGlobalObjectScriptDebugServerh">trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgenth">trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreForwardingHeadersinspectoragentsInspectorDebuggerAgenth">trunk/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorWebDebuggerAgentcpp">trunk/Source/WebCore/inspector/WebDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorWebDebuggerAgenth">trunk/Source/WebCore/inspector/WebDebuggerAgent.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreinspectorInspectorDebuggerAgentcpp">trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDebuggerAgenth">trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/LayoutTests/ChangeLog        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-01-26  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Move InspectorDebuggerAgent into JavaScriptCore
+        https://bugs.webkit.org/show_bug.cgi?id=127629
+
+        Rubber-stamped by Sam Weinig.
+
+        Add a test that we pause in the debugger for console.assert failures
+        when the DebuggerAgent is enabled.
+
+        * inspector-protocol/debugger/pause-on-assert-expected.txt: Added.
+        * inspector-protocol/debugger/pause-on-assert.html: Added.
+        * inspector-protocol/debugger/resources/assert.js: Added.
+        (assertTrue):
+        (assertFalse):
+        (assertCondition):
+        (assertConditionWithMessage):
+
</ins><span class="cx"> 2014-01-25  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove dead code from the JSC profiler.
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldebuggerpauseonassertexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert-expected.txt        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+CONSOLE MESSAGE: line 10: Should always fail.
+CONSOLE MESSAGE: line 22: ASSERT message
+Test that a failing console.assert will pause in the debugger with an optional message.
+
+Should not pause on passing assert.
+inside assertOkay
+Should pause on failing assert.
+inside assertFalse
+PASS: Paused!
+Should not pause on passing assert.
+inside assertCondition, and condition is true
+Should pause on failing assert.
+inside assertCondition, and condition is false
+PASS: Paused!
+Should not pause on passing assert.
+inside assertConditionWithMessage, and condition is true
+Should pause on failing assert and include a message.
+inside assertConditionWithMessage, and condition is false
+PASS: Paused!
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldebuggerpauseonasserthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert.html (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert.html                                (rev 0)
+++ trunk/LayoutTests/inspector-protocol/debugger/pause-on-assert.html        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../http/tests/inspector-protocol/resources/protocol-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/assert.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function test()
+{
+    InspectorTest.sendCommand(&quot;Debugger.enable&quot;, {});
+    InspectorTest.sendCommand(&quot;Debugger.setPauseOnExceptions&quot;, {state: &quot;all&quot;}, InspectorTest.checkForError);
+
+    var step = null;
+    var steps = [
+        {
+            message: &quot;Should not pause on passing assert.&quot;,
+            evaluate: &quot;assertTrue()&quot;,
+            pause: false,
+        },
+        {
+            message: &quot;Should pause on failing assert.&quot;,
+            evaluate: &quot;assertFalse()&quot;,
+            pause: true,
+        },
+        {
+            message: &quot;Should not pause on passing assert.&quot;,
+            evaluate: &quot;assertCondition(window)&quot;,
+            pause: false,
+        },
+        {
+            message: &quot;Should pause on failing assert.&quot;,
+            evaluate: &quot;assertCondition(window === null)&quot;,
+            pause: true,
+        },
+        {
+            message: &quot;Should not pause on passing assert.&quot;,
+            evaluate: &quot;assertConditionWithMessage(window, 'Should not happen')&quot;,
+            pause: false,
+        },
+        {
+            message: &quot;Should pause on failing assert and include a message.&quot;,
+            evaluate: &quot;assertConditionWithMessage(window === null, 'ASSERT message')&quot;,
+            pause: true,
+        },
+    ];
+
+    InspectorTest.eventHandler[&quot;Debugger.paused&quot;] = function(messageObject)
+    {
+        if (step.pause)
+            InspectorTest.log(&quot;PASS: Paused!&quot;);
+        else
+            InspectorTest.log(&quot;FAIL: Paused when unexpected&quot;);
+
+        InspectorTest.sendCommand(&quot;Debugger.resume&quot;, {}, runNextStep);
+    }
+
+    function runNextStep() {
+        step = steps.shift();
+        if (!step) {
+            InspectorTest.completeTest();
+            return;
+        }
+
+        // Evalute the command inside a setTimeout so that we can hit exceptions and break.
+        // Otherwise, evaluating through RuntimeAgent will not trigger a pause.
+        // Likewise, if no pause is expected wait for a bit before continuing.
+        InspectorTest.log(step.message);
+        InspectorTest.sendCommand(&quot;Runtime.evaluate&quot;, {expression: &quot;setTimeout(function(){&quot; + step.evaluate + &quot;}, 0)&quot;}, function(responseObject) {
+            InspectorTest.checkForError(responseObject);
+            if (!step.pause)
+                setTimeout(runNextStep, 20);
+        });
+    }
+
+    runNextStep();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;Test that a failing console.assert will pause in the debugger with an optional message.&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldebuggerresourcesassertjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector-protocol/debugger/resources/assert.js (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/debugger/resources/assert.js                                (rev 0)
+++ trunk/LayoutTests/inspector-protocol/debugger/resources/assert.js        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+function assertTrue()
+{
+    log(&quot;inside assertOkay&quot;);
+    console.assert(true, &quot;Should never happen.&quot;);
+}
+
+function assertFalse()
+{
+    log(&quot;inside assertFalse&quot;);
+    console.assert(false, &quot;Should always fail.&quot;);
+}
+
+function assertCondition(condition)
+{
+    log(&quot;inside assertCondition, and condition is &quot; + !!condition);
+    console.assert(condition);
+}
+
+function assertConditionWithMessage(condition, message)
+{
+    log(&quot;inside assertConditionWithMessage, and condition is &quot; + !!condition);
+    console.assert(condition, message);
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -242,8 +242,8 @@
</span><span class="cx">     inspector/JavaScriptCallFrame.cpp
</span><span class="cx">     inspector/ScriptDebugServer.cpp
</span><span class="cx">     inspector/agents/InspectorAgent.cpp
</span><ins>+    inspector/agents/InspectorDebuggerAgent.cpp
</ins><span class="cx">     inspector/agents/InspectorRuntimeAgent.cpp
</span><del>-    inspector/agents/JSGlobalObjectRuntimeAgent.cpp
</del><span class="cx"> 
</span><span class="cx">     interpreter/AbstractPC.cpp
</span><span class="cx">     interpreter/CallFrame.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2014-01-26  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Move InspectorDebuggerAgent into JavaScriptCore
+        https://bugs.webkit.org/show_bug.cgi?id=127629
+
+        Rubber-stamped by Sam Weinig.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        - Add new files to the build.
+        - Also, since non REMOTE_INSPECTOR ports cannot yet connect to a
+          JSGlobalObject for inspection remove those files as they don't
+          need to be built.
+
+        * inspector/EventLoop.cpp: Added.
+        (Inspector::EventLoop::cycle):
+        * inspector/EventLoop.h: Added.
+        (Inspector::EventLoop::EventLoop):
+        (Inspector::EventLoop::ended):
+        Add a JavaScriptCore version of EventLoop. This is currently only
+        used by the Mac port for JSGlobalObject remote inspection. Keep
+        the WebCore/platform version alive because for the Mac port it does
+        slightly different things involving AppKit.
+
+        * inspector/JSGlobalObjectInspectorController.cpp:
+        (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
+        Create DebuggerAgent and hook up ScriptDebugServer where needed.
+
+        * inspector/JSGlobalObjectScriptDebugServer.cpp: Added.
+        (Inspector::JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer):
+        (Inspector::JSGlobalObjectScriptDebugServer::addListener):
+        (Inspector::JSGlobalObjectScriptDebugServer::removeListener):
+        (Inspector::JSGlobalObjectScriptDebugServer::recompileAllJSFunctions):
+        (Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):
+        * inspector/JSGlobalObjectScriptDebugServer.h: Added.
+        Simple implementation of ScriptDebugServer with a JSGlobalObject.
+
+        * inspector/agents/InspectorDebuggerAgent.cpp: Renamed from Source/WebCore/inspector/InspectorDebuggerAgent.cpp.
+        * inspector/agents/InspectorDebuggerAgent.h: Renamed from Source/WebCore/inspector/InspectorDebuggerAgent.h.
+        Copied from WebCore. A few methods need to be made virtual so that Web implementations
+        can override and extend the funcitonality. E.g. sourceMapURLForScript and enable/disable.
+        
+        * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: Added.
+        * inspector/agents/JSGlobalObjectDebuggerAgent.h: Added.
+        (Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent):
+        (Inspector::JSGlobalObjectDebuggerAgent::startListeningScriptDebugServer):
+        (Inspector::JSGlobalObjectDebuggerAgent::stopListeningScriptDebugServer):
+        (Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval):
+        Simple implementation of DebuggerAGent with a JSGlobalObject.
+
</ins><span class="cx"> 2014-01-25  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Gardening: fix build breakage from previous commit.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/GNUmakefile.list.am (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -665,10 +665,10 @@
</span><span class="cx">         Source/JavaScriptCore/inspector/ScriptDebugServer.h \
</span><span class="cx">         Source/JavaScriptCore/inspector/agents/InspectorAgent.h \
</span><span class="cx">         Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp \
</span><ins>+        Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h \
+        Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp \
</ins><span class="cx">         Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h \
</span><span class="cx">         Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp \
</span><del>-        Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.h \
-        Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp \
</del><span class="cx">         Source/JavaScriptCore/interpreter/AbstractPC.cpp \
</span><span class="cx">         Source/JavaScriptCore/interpreter/AbstractPC.h \
</span><span class="cx">         Source/JavaScriptCore/interpreter/CachedCall.h \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -491,8 +491,8 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\JavaScriptCallFrame.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\ScriptDebugServer.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\agents\InspectorAgent.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\inspector\agents\InspectorDebuggerAgent.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\agents\InspectorRuntimeAgent.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\inspector\agents\JSGlobalObjectRuntimeAgent.cpp&quot; /&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\interpreter\AbstractPC.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\interpreter\CallFrame.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\interpreter\Interpreter.cpp&quot; /&gt;
</span><span class="lines">@@ -1070,8 +1070,8 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\ScriptDebugListener.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\ScriptDebugServer.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\agents\InspectorAgent.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\inspector\agents\InspectorDebuggerAgent.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\agents\InspectorRuntimeAgent.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\inspector\agents\JSGlobalObjectRuntimeAgent.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\interpreter\AbstractPC.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\interpreter\CachedCall.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\interpreter\CallFrame.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -300,10 +300,10 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\agents\InspectorAgent.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\inspector\agents\InspectorRuntimeAgent.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\inspector\agents\InspectorDebuggerAgent.cpp&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\inspector\agents\JSGlobalObjectRuntimeAgent.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\inspector\agents\InspectorRuntimeAgent.cpp&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\interpreter\AbstractPC.cpp&quot;&gt;
</span><span class="lines">@@ -1802,10 +1802,10 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\agents\InspectorAgent.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\inspector\agents\InspectorRuntimeAgent.h&quot;&gt;
</del><ins>+    &lt;ClInclude Include=&quot;..\inspector\agents\InspectorDebuggerAgent.h&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\inspector\agents\JSGlobalObjectRuntimeAgent.h&quot;&gt;
</del><ins>+    &lt;ClInclude Include=&quot;..\inspector\agents\InspectorRuntimeAgent.h&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\interpreter\AbstractPC.h&quot;&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -910,6 +910,8 @@
</span><span class="cx">                 A503FA22188EFF6800110F14 /* ScriptDebugListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA20188EFF6800110F14 /* ScriptDebugListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A503FA25188EFFFD00110F14 /* ScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A503FA23188EFFFD00110F14 /* ScriptDebugServer.cpp */; };
</span><span class="cx">                 A503FA26188EFFFD00110F14 /* ScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA24188EFFFD00110F14 /* ScriptDebugServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                A503FA29188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A503FA27188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp */; };
+                A503FA2A188F105900110F14 /* JSGlobalObjectScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA28188F105900110F14 /* JSGlobalObjectScriptDebugServer.h */; };
</ins><span class="cx">                 A50E4B6118809DD50068A46D /* InspectorRuntimeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A50E4B5D18809DD50068A46D /* InspectorRuntimeAgent.cpp */; };
</span><span class="cx">                 A50E4B6218809DD50068A46D /* InspectorRuntimeAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A50E4B6318809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */; };
</span><span class="lines">@@ -938,6 +940,8 @@
</span><span class="cx">                 A532439318569709002ED692 /* CodeGeneratorInspectorStrings.py in Headers */ = {isa = PBXBuildFile; fileRef = A5324390185696E6002ED692 /* CodeGeneratorInspectorStrings.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A532439418569709002ED692 /* generate-combined-inspector-json.py in Headers */ = {isa = PBXBuildFile; fileRef = A5324391185696E6002ED692 /* generate-combined-inspector-json.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A53243981856A489002ED692 /* InspectorJS.json in Headers */ = {isa = PBXBuildFile; fileRef = A53243951856A475002ED692 /* InspectorJS.json */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                A54982031891D0B00081E5B8 /* EventLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A54982011891D0B00081E5B8 /* EventLoop.cpp */; };
+                A54982041891D0B00081E5B8 /* EventLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = A54982021891D0B00081E5B8 /* EventLoop.h */; };
</ins><span class="cx">                 A54CF2F5184EAB2400237F19 /* ScriptValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A54CF2F2184EAB2400237F19 /* ScriptValue.cpp */; };
</span><span class="cx">                 A54CF2F6184EAB2400237F19 /* ScriptValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A54CF2F3184EAB2400237F19 /* ScriptValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A54CF2F9184EAEDA00237F19 /* ScriptObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A54CF2F7184EAEDA00237F19 /* ScriptObject.cpp */; };
</span><span class="lines">@@ -945,6 +949,10 @@
</span><span class="cx">                 A55D93A5185012A800400DED /* ScriptFunctionCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A55D93A3185012A800400DED /* ScriptFunctionCall.cpp */; };
</span><span class="cx">                 A55D93A6185012A800400DED /* ScriptFunctionCall.h in Headers */ = {isa = PBXBuildFile; fileRef = A55D93A4185012A800400DED /* ScriptFunctionCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A55D93AC18514F7900400DED /* InspectorTypeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A55D93AB18514F7900400DED /* InspectorTypeBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                A57D23E51890CEBF0031C7FA /* InspectorDebuggerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A57D23E31890CEBF0031C7FA /* InspectorDebuggerAgent.cpp */; };
+                A57D23E61890CEBF0031C7FA /* InspectorDebuggerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A57D23E41890CEBF0031C7FA /* InspectorDebuggerAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                A57D23E91891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */; };
+                A57D23EA1891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */; };
</ins><span class="cx">                 A57D23ED1891B5540031C7FA /* RegularExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A57D23EB1891B5540031C7FA /* RegularExpression.cpp */; };
</span><span class="cx">                 A57D23EE1891B5540031C7FA /* RegularExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = A57D23EC1891B5540031C7FA /* RegularExpression.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A57D23F11891B5B40031C7FA /* ContentSearchUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A57D23EF1891B5B40031C7FA /* ContentSearchUtilities.cpp */; };
</span><span class="lines">@@ -2312,6 +2320,8 @@
</span><span class="cx">                 A503FA20188EFF6800110F14 /* ScriptDebugListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugListener.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A503FA23188EFFFD00110F14 /* ScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptDebugServer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A503FA24188EFFFD00110F14 /* ScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugServer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A503FA27188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectScriptDebugServer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A503FA28188F105900110F14 /* JSGlobalObjectScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectScriptDebugServer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A50E4B5D18809DD50068A46D /* InspectorRuntimeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorRuntimeAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorRuntimeAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectRuntimeAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2345,6 +2355,8 @@
</span><span class="cx">                 A5324391185696E6002ED692 /* generate-combined-inspector-json.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = &quot;generate-combined-inspector-json.py&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A53243951856A475002ED692 /* InspectorJS.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = InspectorJS.json; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A53243961856A475002ED692 /* InspectorJSBackendCommands.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InspectorJSBackendCommands.js; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A54982011891D0B00081E5B8 /* EventLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventLoop.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A54982021891D0B00081E5B8 /* EventLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventLoop.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A54CF2F2184EAB2400237F19 /* ScriptValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A54CF2F3184EAB2400237F19 /* ScriptValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A54CF2F7184EAEDA00237F19 /* ScriptObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2352,6 +2364,10 @@
</span><span class="cx">                 A55D93A3185012A800400DED /* ScriptFunctionCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptFunctionCall.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A55D93A4185012A800400DED /* ScriptFunctionCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptFunctionCall.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A55D93AB18514F7900400DED /* InspectorTypeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorTypeBuilder.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A57D23E31890CEBF0031C7FA /* InspectorDebuggerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDebuggerAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A57D23E41890CEBF0031C7FA /* InspectorDebuggerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDebuggerAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectDebuggerAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectDebuggerAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A57D23EB1891B5540031C7FA /* RegularExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegularExpression.cpp; path = yarr/RegularExpression.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A57D23EC1891B5540031C7FA /* RegularExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegularExpression.h; path = yarr/RegularExpression.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A57D23EF1891B5B40031C7FA /* ContentSearchUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentSearchUtilities.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4366,8 +4382,12 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 A5CEEE12187F3BAD00E55C99 /* InspectorAgent.cpp */,
</span><span class="cx">                                 A5CEEE13187F3BAD00E55C99 /* InspectorAgent.h */,
</span><ins>+                                A57D23E31890CEBF0031C7FA /* InspectorDebuggerAgent.cpp */,
+                                A57D23E41890CEBF0031C7FA /* InspectorDebuggerAgent.h */,
</ins><span class="cx">                                 A50E4B5D18809DD50068A46D /* InspectorRuntimeAgent.cpp */,
</span><span class="cx">                                 A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */,
</span><ins>+                                A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */,
+                                A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */,
</ins><span class="cx">                                 A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */,
</span><span class="cx">                                 A50E4B6018809DD50068A46D /* JSGlobalObjectRuntimeAgent.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -4410,6 +4430,8 @@
</span><span class="cx">                                 A532438E185696CE002ED692 /* scripts */,
</span><span class="cx">                                 A57D23EF1891B5B40031C7FA /* ContentSearchUtilities.cpp */,
</span><span class="cx">                                 A57D23F01891B5B40031C7FA /* ContentSearchUtilities.h */,
</span><ins>+                                A54982011891D0B00081E5B8 /* EventLoop.cpp */,
+                                A54982021891D0B00081E5B8 /* EventLoop.h */,
</ins><span class="cx">                                 A513E5B5185B8BD3007E95AD /* InjectedScript.cpp */,
</span><span class="cx">                                 A513E5B6185B8BD3007E95AD /* InjectedScript.h */,
</span><span class="cx">                                 A514B2C0185A684400F3C7CB /* InjectedScriptBase.cpp */,
</span><span class="lines">@@ -4433,6 +4455,8 @@
</span><span class="cx">                                 A593CF811840377100BFCE27 /* InspectorValues.h */,
</span><span class="cx">                                 A51007BE187CC3C600B38879 /* JSGlobalObjectInspectorController.cpp */,
</span><span class="cx">                                 A51007BF187CC3C600B38879 /* JSGlobalObjectInspectorController.h */,
</span><ins>+                                A503FA27188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp */,
+                                A503FA28188F105900110F14 /* JSGlobalObjectScriptDebugServer.h */,
</ins><span class="cx">                                 A513E5BA185BFACC007E95AD /* JSInjectedScriptHost.cpp */,
</span><span class="cx">                                 A513E5BB185BFACC007E95AD /* JSInjectedScriptHost.h */,
</span><span class="cx">                                 A513E5BC185BFACC007E95AD /* JSInjectedScriptHostPrototype.cpp */,
</span><span class="lines">@@ -4607,6 +4631,7 @@
</span><span class="cx">                                 BC1166020E1997B4008066DD /* DateInstance.h in Headers */,
</span><span class="cx">                                 14A1563210966365006FA260 /* DateInstanceCache.h in Headers */,
</span><span class="cx">                                 BCD2034C0E17135E002C7E82 /* DatePrototype.h in Headers */,
</span><ins>+                                A503FA2A188F105900110F14 /* JSGlobalObjectScriptDebugServer.h in Headers */,
</ins><span class="cx">                                 BCD203E80E1718F4002C7E82 /* DatePrototype.lut.h in Headers */,
</span><span class="cx">                                 BC18C3FA0E16F5CD00B34460 /* Debugger.h in Headers */,
</span><span class="cx">                                 BC3135640F302FA3003DFD3A /* DebuggerActivation.h in Headers */,
</span><span class="lines">@@ -4675,6 +4700,7 @@
</span><span class="cx">                                 A7D89CFA17A0B8CC00773AD8 /* DFGFlushLivenessAnalysisPhase.h in Headers */,
</span><span class="cx">                                 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */,
</span><span class="cx">                                 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */,
</span><ins>+                                A57D23E61890CEBF0031C7FA /* InspectorDebuggerAgent.h in Headers */,
</ins><span class="cx">                                 0FB14E211812570B009B6B4D /* DFGInlineCacheWrapper.h in Headers */,
</span><span class="cx">                                 0FB14E2318130955009B6B4D /* DFGInlineCacheWrapperInlines.h in Headers */,
</span><span class="cx">                                 A704D90617A0BAA8006BA554 /* DFGInPlaceAbstractState.h in Headers */,
</span><span class="lines">@@ -4735,6 +4761,7 @@
</span><span class="cx">                                 0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */,
</span><span class="cx">                                 0F34B14A16D42013001CDA5A /* DFGUseKind.h in Headers */,
</span><span class="cx">                                 0F3B3A2C15475002003ED0FF /* DFGValidate.h in Headers */,
</span><ins>+                                A57D23EA1891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h in Headers */,
</ins><span class="cx">                                 0F2BDC471522802500CD8910 /* DFGValueRecoveryOverride.h in Headers */,
</span><span class="cx">                                 0F2BDC481522802900CD8910 /* DFGValueSource.h in Headers */,
</span><span class="cx">                                 0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */,
</span><span class="lines">@@ -4858,6 +4885,7 @@
</span><span class="cx">                                 860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
</span><span class="cx">                                 BC18C4130E16F5CD00B34460 /* JavaScript.h in Headers */,
</span><span class="cx">                                 BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */,
</span><ins>+                                A54982041891D0B00081E5B8 /* EventLoop.h in Headers */,
</ins><span class="cx">                                 BC18C4150E16F5CD00B34460 /* JavaScriptCorePrefix.h in Headers */,
</span><span class="cx">                                 1429D9300ED22D7000B89619 /* JIT.h in Headers */,
</span><span class="cx">                                 86CCEFDE0F413F8900FD7F9E /* JITCode.h in Headers */,
</span><span class="lines">@@ -5807,6 +5835,7 @@
</span><span class="cx">                                 0F34B14916D42010001CDA5A /* DFGUseKind.cpp in Sources */,
</span><span class="cx">                                 0F3B3A2B15475000003ED0FF /* DFGValidate.cpp in Sources */,
</span><span class="cx">                                 A55D93A5185012A800400DED /* ScriptFunctionCall.cpp in Sources */,
</span><ins>+                                A503FA29188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp in Sources */,
</ins><span class="cx">                                 0F2BDC4F15228BF300CD8910 /* DFGValueSource.cpp in Sources */,
</span><span class="cx">                                 0FDDBFB51666EED800C55FEF /* DFGVariableAccessDataDump.cpp in Sources */,
</span><span class="cx">                                 0F2BDC5115228FFD00CD8910 /* DFGVariableEvent.cpp in Sources */,
</span><span class="lines">@@ -5841,6 +5870,7 @@
</span><span class="cx">                                 0F235BD817178E1C00690C7F /* FTLExitThunkGenerator.cpp in Sources */,
</span><span class="cx">                                 0F235BDA17178E1C00690C7F /* FTLExitValue.cpp in Sources */,
</span><span class="cx">                                 A7F2996B17A0BB670010417A /* FTLFail.cpp in Sources */,
</span><ins>+                                A57D23E51890CEBF0031C7FA /* InspectorDebuggerAgent.cpp in Sources */,
</ins><span class="cx">                                 0FD8A31917D51F2200CA2C40 /* FTLForOSREntryJITCode.cpp in Sources */,
</span><span class="cx">                                 0F25F1AF181635F300522F39 /* FTLInlineCacheSize.cpp in Sources */,
</span><span class="cx">                                 0FEA0A281709623B00BB722C /* FTLIntrinsicRepository.cpp in Sources */,
</span><span class="lines">@@ -5903,6 +5933,7 @@
</span><span class="cx">                                 0FB14E1E18124ACE009B6B4D /* JITInlineCacheGenerator.cpp in Sources */,
</span><span class="cx">                                 BCDD51EB0FB8DF74004A8BDC /* JITOpcodes.cpp in Sources */,
</span><span class="cx">                                 A71236E51195F33C00BD2174 /* JITOpcodes32_64.cpp in Sources */,
</span><ins>+                                A54982031891D0B00081E5B8 /* EventLoop.cpp in Sources */,
</ins><span class="cx">                                 2A4EC90B1860D6C20094F782 /* WriteBarrierBuffer.cpp in Sources */,
</span><span class="cx">                                 0F24E54C17EE274900ABB217 /* JITOperations.cpp in Sources */,
</span><span class="cx">                                 86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */,
</span><span class="lines">@@ -5980,6 +6011,7 @@
</span><span class="cx">                                 A503FA1B188E0FB000110F14 /* JSJavaScriptCallFrame.cpp in Sources */,
</span><span class="cx">                                 86E3C618167BABEE006D760A /* JSWrapperMap.mm in Sources */,
</span><span class="cx">                                 14280870107EC1340013E7B2 /* JSWrapperObject.cpp in Sources */,
</span><ins>+                                A57D23E91891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp in Sources */,
</ins><span class="cx">                                 BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */,
</span><span class="cx">                                 0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */,
</span><span class="cx">                                 95AB83420DA4322500BC83F3 /* LegacyProfiler.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorEventLoopcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/EventLoop.cpp (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/EventLoop.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/EventLoop.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;EventLoop.h&quot;
+
+#if OS(WINDOWS)
+#include &lt;windows.h&gt;
+#elif USE(CF)
+#include &lt;CoreFoundation/CFRunLoop.h&gt;
+#elif PLATFORM(EFL)
+#include &lt;Ecore.h&gt;
+#elif PLATFORM(GTK)
+#include &lt;glib.h&gt;
+#endif
+
+namespace Inspector {
+
+void EventLoop::cycle()
+{
+#if OS(WINDOWS)
+    MSG msg;
+    if (!GetMessage(&amp;msg, 0, 0, 0)) {
+        m_ended = true;
+        return;
+    }
+    TranslateMessage(&amp;msg);
+    DispatchMessage(&amp;msg);
+#elif USE(CF)
+    CFTimeInterval timeInterval = 0.05;
+    CFRunLoopRunInMode(kCFRunLoopDefaultMode, timeInterval, true);
+#elif PLATFORM(EFL)
+    ecore_main_loop_iterate();
+#elif PLATFORM(GTK)
+    g_main_context_iteration(NULL, FALSE);
+#endif
+}
+
+} // namespace Inspector
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorEventLooph"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/EventLoop.h (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/EventLoop.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/EventLoop.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EventLoop_h
+#define EventLoop_h
+
+#include &lt;wtf/Noncopyable.h&gt;
+
+namespace Inspector {
+
+class EventLoop {
+    WTF_MAKE_NONCOPYABLE(EventLoop);
+public:
+    EventLoop()
+        : m_ended(false)
+    {
+    }
+
+    void cycle();
+    bool ended() const { return m_ended; }
+
+private:
+    bool m_ended;
+};
+
+} // namespace Inspector
+
+#endif // EventLoop_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSGlobalObjectInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;InspectorBackendDispatcher.h&quot;
</span><span class="cx"> #include &quot;InspectorFrontendChannel.h&quot;
</span><span class="cx"> #include &quot;JSGlobalObject.h&quot;
</span><ins>+#include &quot;JSGlobalObjectDebuggerAgent.h&quot;
</ins><span class="cx"> #include &quot;JSGlobalObjectRuntimeAgent.h&quot;
</span><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="lines">@@ -47,7 +48,16 @@
</span><span class="cx">     , m_inspectorFrontendChannel(nullptr)
</span><span class="cx"> {
</span><span class="cx">     m_agents.append(std::make_unique&lt;InspectorAgent&gt;());
</span><del>-    m_agents.append(std::make_unique&lt;JSGlobalObjectRuntimeAgent&gt;(m_injectedScriptManager.get(), m_globalObject));
</del><ins>+
+    auto runtimeAgentPtr = std::make_unique&lt;JSGlobalObjectRuntimeAgent&gt;(m_injectedScriptManager.get(), m_globalObject);
+    InspectorRuntimeAgent* runtimeAgent = runtimeAgentPtr.get();
+    m_agents.append(std::move(runtimeAgentPtr));
+
+    auto debuggerAgentPtr = std::make_unique&lt;JSGlobalObjectDebuggerAgent&gt;(m_injectedScriptManager.get(), m_globalObject);
+    InspectorDebuggerAgent* debuggerAgent = debuggerAgentPtr.get();
+    m_agents.append(std::move(debuggerAgentPtr));
+
+    runtimeAgent-&gt;setScriptDebugServer(&amp;debuggerAgent-&gt;scriptDebugServer());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSGlobalObjectInspectorController::~JSGlobalObjectInspectorController()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSGlobalObjectScriptDebugServercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSGlobalObjectScriptDebugServer.h&quot;
+
+#if ENABLE(INSPECTOR)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include &quot;EventLoop.h&quot;
+
+using namespace JSC;
+
+namespace Inspector {
+
+JSGlobalObjectScriptDebugServer::JSGlobalObjectScriptDebugServer(JSGlobalObject&amp; globalObject)
+    : ScriptDebugServer(false)
+    , m_globalObject(globalObject)
+{
+}
+
+void JSGlobalObjectScriptDebugServer::addListener(ScriptDebugListener* listener)
+{
+    if (!listener)
+        return;
+
+    bool wasEmpty = m_listeners.isEmpty();
+    m_listeners.add(listener);
+
+    // First listener. Attach the debugger to the JSGlobalObject.
+    if (wasEmpty) {
+        attach(&amp;m_globalObject);
+        recompileAllJSFunctions();
+    }
+}
+
+void JSGlobalObjectScriptDebugServer::removeListener(ScriptDebugListener* listener, bool isBeingDestroyed)
+{
+    if (!listener)
+        return;
+
+    m_listeners.remove(listener);
+
+    // Last listener. Detach the debugger from the JSGlobalObject.
+    if (m_listeners.isEmpty()) {
+        detach(&amp;m_globalObject, isBeingDestroyed ? Debugger::GlobalObjectIsDestructing : Debugger::TerminatingDebuggingSession);
+        if (!isBeingDestroyed)
+            recompileAllJSFunctions();
+    }
+}
+
+void JSGlobalObjectScriptDebugServer::recompileAllJSFunctions()
+{
+    JSC::Debugger::recompileAllJSFunctions(&amp;m_globalObject.vm());
+}
+
+void JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused()
+{
+    EventLoop loop;
+    while (!m_doneProcessingDebuggerEvents &amp;&amp; !loop.ended())
+        loop.cycle();
+}
+
+} // namespace Inspector
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSGlobalObjectScriptDebugServerh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.h (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSGlobalObjectScriptDebugServer_h
+#define JSGlobalObjectScriptDebugServer_h
+
+#if ENABLE(INSPECTOR)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include &quot;ScriptDebugServer.h&quot;
+#include &lt;wtf/Forward.h&gt;
+
+namespace Inspector {
+
+class JSGlobalObjectScriptDebugServer final : public ScriptDebugServer {
+    WTF_MAKE_NONCOPYABLE(JSGlobalObjectScriptDebugServer);
+public:
+    JSGlobalObjectScriptDebugServer(JSC::JSGlobalObject&amp;);
+    virtual ~JSGlobalObjectScriptDebugServer() { }
+
+    void addListener(ScriptDebugListener*);
+    void removeListener(ScriptDebugListener*, bool isBeingDestroyed);
+
+    JSC::JSGlobalObject&amp; globalObject() const { return m_globalObject; }
+
+    virtual void recompileAllJSFunctions() override;
+
+private:
+    virtual ListenerSet* getListenersForGlobalObject(JSC::JSGlobalObject*) override { return &amp;m_listeners; }
+    virtual void didPause(JSC::JSGlobalObject*) override { }
+    virtual void didContinue(JSC::JSGlobalObject*) override { }
+    virtual void runEventLoopWhilePaused() override;
+    virtual bool isContentScript(JSC::ExecState*) const override { return false; }
+
+    // FIXME: JavaScript inspection has no Console yet.
+    virtual void reportException(JSC::ExecState*, JSC::JSValue) const override { }
+
+    ListenerSet m_listeners;
+    JSC::JSGlobalObject&amp; m_globalObject;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+#endif // ENABLE(INSPECTOR)
+
+#endif // JSGlobalObjectScriptDebugServer_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcppfromrev162797trunkSourceWebCoreinspectorInspectorDebuggerAgentcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (from rev 162797, trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp) (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,738 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;InspectorDebuggerAgent.h&quot;
+
+#if ENABLE(INSPECTOR)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include &quot;ContentSearchUtilities.h&quot;
+#include &quot;InjectedScript.h&quot;
+#include &quot;InjectedScriptManager.h&quot;
+#include &quot;InspectorValues.h&quot;
+#include &quot;RegularExpression.h&quot;
+#include &quot;ScriptDebugServer.h&quot;
+#include &quot;ScriptObject.h&quot;
+#include &quot;ScriptValue.h&quot;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace Inspector {
+
+const char* InspectorDebuggerAgent::backtraceObjectGroup = &quot;backtrace&quot;;
+
+static String objectGroupForBreakpointAction(int identifier)
+{
+    DEFINE_STATIC_LOCAL(const AtomicString, objectGroup, (&quot;breakpoint-action-&quot;, AtomicString::ConstructFromLiteral));
+    return makeString(objectGroup, String::number(identifier));
+}
+
+InspectorDebuggerAgent::InspectorDebuggerAgent(InjectedScriptManager* injectedScriptManager)
+    : InspectorAgentBase(ASCIILiteral(&quot;Debugger&quot;))
+    , m_injectedScriptManager(injectedScriptManager)
+    , m_listener(nullptr)
+    , m_pausedScriptState(nullptr)
+    , m_continueToLocationBreakpointID(JSC::noBreakpointID)
+    , m_enabled(false)
+    , m_javaScriptPauseScheduled(false)
+    , m_nextProbeSampleId(1)
+    , m_nextBreakpointActionIdentifier(1)
+{
+    // FIXME: make breakReason optional so that there was no need to init it with &quot;other&quot;.
+    clearBreakDetails();
+}
+
+InspectorDebuggerAgent::~InspectorDebuggerAgent()
+{
+}
+
+void InspectorDebuggerAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+{
+    m_frontendDispatcher = std::make_unique&lt;InspectorDebuggerFrontendDispatcher&gt;(frontendChannel);
+    m_backendDispatcher = InspectorDebuggerBackendDispatcher::create(backendDispatcher, this);
+}
+
+void InspectorDebuggerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason reason)
+{
+    m_frontendDispatcher = nullptr;
+    m_backendDispatcher.clear();
+
+    bool skipRecompile = reason == InspectorDisconnectReason::InspectedTargetDestroyed;
+    disable(skipRecompile);
+}
+
+void InspectorDebuggerAgent::enable()
+{
+    if (m_enabled)
+        return;
+
+    scriptDebugServer().setBreakpointsActivated(true);
+    startListeningScriptDebugServer();
+
+    if (m_listener)
+        m_listener-&gt;debuggerWasEnabled();
+
+    m_enabled = true;
+}
+
+void InspectorDebuggerAgent::disable(bool isBeingDestroyed)
+{
+    if (!m_enabled)
+        return;
+
+    m_javaScriptBreakpoints.clear();
+
+    stopListeningScriptDebugServer(isBeingDestroyed);
+    clearResolvedBreakpointState();
+
+    if (m_listener)
+        m_listener-&gt;debuggerWasDisabled();
+
+    m_enabled = false;
+}
+
+void InspectorDebuggerAgent::enable(ErrorString*)
+{
+    enable();
+}
+
+void InspectorDebuggerAgent::disable(ErrorString*)
+{
+    disable(false);
+}
+
+void InspectorDebuggerAgent::setBreakpointsActive(ErrorString*, bool active)
+{
+    if (active)
+        scriptDebugServer().activateBreakpoints();
+    else
+        scriptDebugServer().deactivateBreakpoints();
+}
+
+bool InspectorDebuggerAgent::isPaused()
+{
+    return scriptDebugServer().isPaused();
+}
+
+void InspectorDebuggerAgent::handleConsoleAssert()
+{
+    if (scriptDebugServer().pauseOnExceptionsState() != JSC::Debugger::DontPauseOnExceptions)
+        breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Assert, nullptr);
+}
+
+static PassRefPtr&lt;InspectorObject&gt; buildObjectForBreakpointCookie(const String&amp; url, int lineNumber, int columnNumber, const String&amp; condition, RefPtr&lt;InspectorArray&gt;&amp; actions, bool isRegex, bool autoContinue)
+{
+    RefPtr&lt;InspectorObject&gt; breakpointObject = InspectorObject::create();
+    breakpointObject-&gt;setString(ASCIILiteral(&quot;url&quot;), url);
+    breakpointObject-&gt;setNumber(ASCIILiteral(&quot;lineNumber&quot;), lineNumber);
+    breakpointObject-&gt;setNumber(ASCIILiteral(&quot;columnNumber&quot;), columnNumber);
+    breakpointObject-&gt;setString(ASCIILiteral(&quot;condition&quot;), condition);
+    breakpointObject-&gt;setBoolean(ASCIILiteral(&quot;isRegex&quot;), isRegex);
+    breakpointObject-&gt;setBoolean(ASCIILiteral(&quot;autoContinue&quot;), autoContinue);
+
+    if (actions)
+        breakpointObject-&gt;setArray(ASCIILiteral(&quot;actions&quot;), actions);
+
+    return breakpointObject;
+}
+
+static bool matches(const String&amp; url, const String&amp; pattern, bool isRegex)
+{
+    if (isRegex) {
+        JSC::Yarr::RegularExpression regex(pattern, TextCaseSensitive);
+        return regex.match(url) != -1;
+    }
+    return url == pattern;
+}
+
+static bool breakpointActionTypeForString(const String&amp; typeString, ScriptBreakpointActionType* output)
+{
+    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Log)) {
+        *output = ScriptBreakpointActionTypeLog;
+        return true;
+    }
+    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Evaluate)) {
+        *output = ScriptBreakpointActionTypeEvaluate;
+        return true;
+    }
+    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Sound)) {
+        *output = ScriptBreakpointActionTypeSound;
+        return true;
+    }
+    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Probe)) {
+        *output = ScriptBreakpointActionTypeProbe;
+        return true;
+    }
+
+    return false;
+}
+
+bool InspectorDebuggerAgent::breakpointActionsFromProtocol(ErrorString* errorString, RefPtr&lt;InspectorArray&gt;&amp; actions, Vector&lt;ScriptBreakpointAction&gt;* result)
+{
+    if (!actions)
+        return true;
+
+    unsigned actionsLength = actions-&gt;length();
+    if (!actionsLength)
+        return true;
+
+    result-&gt;reserveCapacity(actionsLength);
+    for (unsigned i = 0; i &lt; actionsLength; ++i) {
+        RefPtr&lt;InspectorValue&gt; value = actions-&gt;get(i);
+        RefPtr&lt;InspectorObject&gt; object;
+        if (!value-&gt;asObject(&amp;object)) {
+            *errorString = ASCIILiteral(&quot;BreakpointAction of incorrect type, expected object&quot;);
+            return false;
+        }
+
+        String typeString;
+        if (!object-&gt;getString(ASCIILiteral(&quot;type&quot;), &amp;typeString)) {
+            *errorString = ASCIILiteral(&quot;BreakpointAction had type missing&quot;);
+            return false;
+        }
+
+        ScriptBreakpointActionType type;
+        if (!breakpointActionTypeForString(typeString, &amp;type)) {
+            *errorString = ASCIILiteral(&quot;BreakpointAction had unknown type&quot;);
+            return false;
+        }
+
+        String data;
+        object-&gt;getString(ASCIILiteral(&quot;data&quot;), &amp;data);
+
+        result-&gt;append(ScriptBreakpointAction(type, m_nextBreakpointActionIdentifier++, data));
+    }
+
+    return true;
+}
+
+void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const RefPtr&lt;InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::Location&gt;&gt;&amp; locations, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers)
+{
+    locations = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::Location&gt;::create();
+    if (!optionalURL == !optionalURLRegex) {
+        *errorString = ASCIILiteral(&quot;Either url or urlRegex must be specified.&quot;);
+        return;
+    }
+
+    String url = optionalURL ? *optionalURL : *optionalURLRegex;
+    int columnNumber = optionalColumnNumber ? *optionalColumnNumber : 0;
+    bool isRegex = optionalURLRegex;
+
+    String breakpointIdentifier = (isRegex ? &quot;/&quot; + url + &quot;/&quot; : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
+    if (m_javaScriptBreakpoints.contains(breakpointIdentifier)) {
+        *errorString = ASCIILiteral(&quot;Breakpoint at specified location already exists.&quot;);
+        return;
+    }
+
+    String condition = emptyString();
+    bool autoContinue = false;
+    RefPtr&lt;InspectorArray&gt; actions;
+    if (options) {
+        (*options)-&gt;getString(ASCIILiteral(&quot;condition&quot;), &amp;condition);
+        (*options)-&gt;getBoolean(ASCIILiteral(&quot;autoContinue&quot;), &amp;autoContinue);
+        actions = (*options)-&gt;getArray(ASCIILiteral(&quot;actions&quot;));
+    }
+
+    Vector&lt;ScriptBreakpointAction&gt; breakpointActions;
+    if (!breakpointActionsFromProtocol(errorString, actions, &amp;breakpointActions))
+        return;
+
+    breakpointActionIdentifiers = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;::create();
+    for (ScriptBreakpointAction&amp; action : breakpointActions)
+        breakpointActionIdentifiers-&gt;addItem(action.identifier);
+
+    m_javaScriptBreakpoints.set(breakpointIdentifier, buildObjectForBreakpointCookie(url, lineNumber, columnNumber, condition, actions, isRegex, autoContinue));
+
+    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, breakpointActions, autoContinue);
+    for (ScriptsMap::iterator it = m_scripts.begin(); it != m_scripts.end(); ++it) {
+        String scriptURL = !it-&gt;value.sourceURL.isEmpty() ? it-&gt;value.sourceURL : it-&gt;value.url;
+        if (!matches(scriptURL, url, isRegex))
+            continue;
+
+        RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; location = resolveBreakpoint(breakpointIdentifier, it-&gt;key, breakpoint);
+        if (location)
+            locations-&gt;addItem(location);
+    }
+    *outBreakpointIdentifier = breakpointIdentifier;
+}
+
+static bool parseLocation(ErrorString* errorString, InspectorObject* location, JSC::SourceID* sourceID, unsigned* lineNumber, unsigned* columnNumber)
+{
+    String scriptIDStr;
+    if (!location-&gt;getString(ASCIILiteral(&quot;scriptId&quot;), &amp;scriptIDStr) || !location-&gt;getNumber(ASCIILiteral(&quot;lineNumber&quot;), lineNumber)) {
+        *sourceID = JSC::noSourceID;
+        *errorString = ASCIILiteral(&quot;scriptId and lineNumber are required.&quot;);
+        return false;
+    }
+
+    *sourceID = scriptIDStr.toIntPtr();
+    *columnNumber = 0;
+    location-&gt;getNumber(ASCIILiteral(&quot;columnNumber&quot;), columnNumber);
+    return true;
+}
+
+void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr&lt;InspectorObject&gt;&amp; location, const RefPtr&lt;InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt;&amp; actualLocation, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers)
+{
+    JSC::SourceID sourceID;
+    unsigned lineNumber;
+    unsigned columnNumber;
+    if (!parseLocation(errorString, location.get(), &amp;sourceID, &amp;lineNumber, &amp;columnNumber))
+        return;
+
+    String condition = emptyString();
+    bool autoContinue = false;
+    RefPtr&lt;InspectorArray&gt; actions;
+    if (options) {
+        (*options)-&gt;getString(ASCIILiteral(&quot;condition&quot;), &amp;condition);
+        (*options)-&gt;getBoolean(ASCIILiteral(&quot;autoContinue&quot;), &amp;autoContinue);
+        actions = (*options)-&gt;getArray(ASCIILiteral(&quot;actions&quot;));
+    }
+
+    Vector&lt;ScriptBreakpointAction&gt; breakpointActions;
+    if (!breakpointActionsFromProtocol(errorString, actions, &amp;breakpointActions))
+        return;
+
+    breakpointActionIdentifiers = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;::create();
+    for (ScriptBreakpointAction&amp; action : breakpointActions)
+        breakpointActionIdentifiers-&gt;addItem(action.identifier);
+
+    String breakpointIdentifier = String::number(sourceID) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
+    if (m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier) != m_breakpointIdentifierToDebugServerBreakpointIDs.end()) {
+        *errorString = ASCIILiteral(&quot;Breakpoint at specified location already exists.&quot;);
+        return;
+    }
+
+    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, breakpointActions, autoContinue);
+    actualLocation = resolveBreakpoint(breakpointIdentifier, sourceID, breakpoint);
+    if (!actualLocation) {
+        *errorString = ASCIILiteral(&quot;Could not resolve breakpoint&quot;);
+        return;
+    }
+
+    *outBreakpointIdentifier = breakpointIdentifier;
+}
+
+void InspectorDebuggerAgent::removeBreakpoint(ErrorString*, const String&amp; breakpointIdentifier)
+{
+    m_javaScriptBreakpoints.remove(breakpointIdentifier);
+
+    Vector&lt;JSC::BreakpointID&gt; breakpointIDs = m_breakpointIdentifierToDebugServerBreakpointIDs.take(breakpointIdentifier);
+    for (auto breakpointID : breakpointIDs) {
+        const Vector&lt;ScriptBreakpointAction&gt;&amp; breakpointActions = scriptDebugServer().getActionsForBreakpoint(breakpointID);
+        for (auto&amp; action : breakpointActions)
+            m_injectedScriptManager-&gt;releaseObjectGroup(objectGroupForBreakpointAction(action.identifier));
+
+        scriptDebugServer().removeBreakpoint(breakpointID);
+    }
+}
+
+void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, const RefPtr&lt;InspectorObject&gt;&amp; location)
+{
+    if (m_continueToLocationBreakpointID != JSC::noBreakpointID) {
+        scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointID);
+        m_continueToLocationBreakpointID = JSC::noBreakpointID;
+    }
+
+    JSC::SourceID sourceID;
+    unsigned lineNumber;
+    unsigned columnNumber;
+    if (!parseLocation(errorString, location.get(), &amp;sourceID, &amp;lineNumber, &amp;columnNumber))
+        return;
+
+    ScriptBreakpoint breakpoint(lineNumber, columnNumber, &quot;&quot;, false);
+    m_continueToLocationBreakpointID = scriptDebugServer().setBreakpoint(sourceID, breakpoint, &amp;lineNumber, &amp;columnNumber);
+    resume(errorString);
+}
+
+PassRefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; InspectorDebuggerAgent::resolveBreakpoint(const String&amp; breakpointIdentifier, JSC::SourceID sourceID, const ScriptBreakpoint&amp; breakpoint)
+{
+    ScriptsMap::iterator scriptIterator = m_scripts.find(sourceID);
+    if (scriptIterator == m_scripts.end())
+        return nullptr;
+    Script&amp; script = scriptIterator-&gt;value;
+    if (breakpoint.lineNumber &lt; script.startLine || script.endLine &lt; breakpoint.lineNumber)
+        return nullptr;
+
+    unsigned actualLineNumber;
+    unsigned actualColumnNumber;
+    JSC::BreakpointID debugServerBreakpointID = scriptDebugServer().setBreakpoint(sourceID, breakpoint, &amp;actualLineNumber, &amp;actualColumnNumber);
+    if (debugServerBreakpointID == JSC::noBreakpointID)
+        return nullptr;
+
+    BreakpointIdentifierToDebugServerBreakpointIDsMap::iterator debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier);
+    if (debugServerBreakpointIDsIterator == m_breakpointIdentifierToDebugServerBreakpointIDs.end())
+        debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.set(breakpointIdentifier, Vector&lt;JSC::BreakpointID&gt;()).iterator;
+    debugServerBreakpointIDsIterator-&gt;value.append(debugServerBreakpointID);
+
+    RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; location = Inspector::TypeBuilder::Debugger::Location::create()
+        .setScriptId(String::number(sourceID))
+        .setLineNumber(actualLineNumber);
+    location-&gt;setColumnNumber(actualColumnNumber);
+    return location;
+}
+
+void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String&amp; scriptIDStr, const String&amp; query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::GenericTypes::SearchMatch&gt;&gt;&amp; results)
+{
+    bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
+    bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
+
+    JSC::SourceID sourceID = scriptIDStr.toIntPtr();
+    ScriptsMap::iterator it = m_scripts.find(sourceID);
+    if (it != m_scripts.end())
+        results = ContentSearchUtilities::searchInTextByLines(it-&gt;value.source, query, caseSensitive, isRegex);
+    else
+        *error = &quot;No script for id: &quot; + scriptIDStr;
+}
+
+void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String&amp; scriptIDStr, String* scriptSource)
+{
+    JSC::SourceID sourceID = scriptIDStr.toIntPtr();
+    ScriptsMap::iterator it = m_scripts.find(sourceID);
+    if (it != m_scripts.end())
+        *scriptSource = it-&gt;value.source;
+    else
+        *error = &quot;No script for id: &quot; + scriptIDStr;
+}
+
+void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String&amp; functionId, RefPtr&lt;Inspector::TypeBuilder::Debugger::FunctionDetails&gt;&amp; details)
+{
+    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptForObjectId(functionId);
+    if (injectedScript.hasNoValue()) {
+        *errorString = ASCIILiteral(&quot;Function object id is obsolete&quot;);
+        return;
+    }
+
+    injectedScript.getFunctionDetails(errorString, functionId, &amp;details);
+}
+
+void InspectorDebuggerAgent::schedulePauseOnNextStatement(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;InspectorObject&gt; data)
+{
+    if (m_javaScriptPauseScheduled)
+        return;
+
+    m_breakReason = breakReason;
+    m_breakAuxData = data;
+    scriptDebugServer().setPauseOnNextStatement(true);
+}
+
+void InspectorDebuggerAgent::cancelPauseOnNextStatement()
+{
+    if (m_javaScriptPauseScheduled)
+        return;
+
+    clearBreakDetails();
+    scriptDebugServer().setPauseOnNextStatement(false);
+}
+
+void InspectorDebuggerAgent::pause(ErrorString*)
+{
+    if (m_javaScriptPauseScheduled)
+        return;
+
+    clearBreakDetails();
+    scriptDebugServer().setPauseOnNextStatement(true);
+    m_javaScriptPauseScheduled = true;
+}
+
+void InspectorDebuggerAgent::resume(ErrorString* errorString)
+{
+    if (!assertPaused(errorString))
+        return;
+
+    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
+    scriptDebugServer().continueProgram();
+}
+
+void InspectorDebuggerAgent::stepOver(ErrorString* errorString)
+{
+    if (!assertPaused(errorString))
+        return;
+
+    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
+    scriptDebugServer().stepOverStatement();
+}
+
+void InspectorDebuggerAgent::stepInto(ErrorString* errorString)
+{
+    if (!assertPaused(errorString))
+        return;
+
+    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
+    scriptDebugServer().stepIntoStatement();
+    m_listener-&gt;stepInto();
+}
+
+void InspectorDebuggerAgent::stepOut(ErrorString* errorString)
+{
+    if (!assertPaused(errorString))
+        return;
+
+    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
+    scriptDebugServer().stepOutOfFunction();
+}
+
+void InspectorDebuggerAgent::setPauseOnExceptions(ErrorString* errorString, const String&amp; stringPauseState)
+{
+    JSC::Debugger::PauseOnExceptionsState pauseState;
+    if (stringPauseState == &quot;none&quot;)
+        pauseState = JSC::Debugger::DontPauseOnExceptions;
+    else if (stringPauseState == &quot;all&quot;)
+        pauseState = JSC::Debugger::PauseOnAllExceptions;
+    else if (stringPauseState == &quot;uncaught&quot;)
+        pauseState = JSC::Debugger::PauseOnUncaughtExceptions;
+    else {
+        *errorString = &quot;Unknown pause on exceptions mode: &quot; + stringPauseState;
+        return;
+    }
+
+    scriptDebugServer().setPauseOnExceptionsState(static_cast&lt;JSC::Debugger::PauseOnExceptionsState&gt;(pauseState));
+    if (scriptDebugServer().pauseOnExceptionsState() != pauseState)
+        *errorString = ASCIILiteral(&quot;Internal error. Could not change pause on exceptions state&quot;);
+}
+
+void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String&amp; callFrameId, const String&amp; expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr&lt;Inspector::TypeBuilder::Runtime::RemoteObject&gt;&amp; result, Inspector::TypeBuilder::OptOutput&lt;bool&gt;* wasThrown)
+{
+    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptForObjectId(callFrameId);
+    if (injectedScript.hasNoValue()) {
+        *errorString = ASCIILiteral(&quot;Inspected frame has gone&quot;);
+        return;
+    }
+
+    JSC::Debugger::PauseOnExceptionsState previousPauseOnExceptionsState = scriptDebugServer().pauseOnExceptionsState();
+    if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
+        if (previousPauseOnExceptionsState != JSC::Debugger::DontPauseOnExceptions)
+            scriptDebugServer().setPauseOnExceptionsState(JSC::Debugger::DontPauseOnExceptions);
+        muteConsole();
+    }
+
+    injectedScript.evaluateOnCallFrame(errorString, m_currentCallStack, callFrameId, expression, objectGroup ? *objectGroup : &quot;&quot;, includeCommandLineAPI ? *includeCommandLineAPI : false, returnByValue ? *returnByValue : false, generatePreview ? *generatePreview : false, &amp;result, wasThrown);
+
+    if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
+        unmuteConsole();
+        if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState)
+            scriptDebugServer().setPauseOnExceptionsState(previousPauseOnExceptionsState);
+    }
+}
+
+void InspectorDebuggerAgent::setOverlayMessage(ErrorString*, const String*)
+{
+}
+
+void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String&amp; directiveText)
+{
+    if (scriptDebugServer().pauseOnExceptionsState() != JSC::Debugger::DontPauseOnExceptions) {
+        RefPtr&lt;InspectorObject&gt; directive = InspectorObject::create();
+        directive-&gt;setString(ASCIILiteral(&quot;directiveText&quot;), directiveText);
+        breakProgram(InspectorDebuggerFrontendDispatcher::Reason::CSPViolation, directive.release());
+    }
+}
+
+PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;&gt; InspectorDebuggerAgent::currentCallFrames()
+{
+    if (!m_pausedScriptState)
+        return Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;::create();
+
+    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptFor(m_pausedScriptState);
+    if (injectedScript.hasNoValue()) {
+        ASSERT_NOT_REACHED();
+        return Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;::create();
+    }
+
+    return injectedScript.wrapCallFrames(m_currentCallStack);
+}
+
+String InspectorDebuggerAgent::sourceMapURLForScript(const Script&amp; script)
+{
+    return ContentSearchUtilities::findScriptSourceMapURL(script.source);
+}
+
+void InspectorDebuggerAgent::didParseSource(JSC::SourceID sourceID, const Script&amp; inScript)
+{
+    Script script = inScript;
+    // FIXME: Why does -[JSContext evaluateScript] have a -1 startLine?
+    if (script.startLine &lt;= 0 &amp;&amp; !script.startColumn)
+        script.sourceURL = ContentSearchUtilities::findScriptSourceURL(script.source);
+    script.sourceMappingURL = sourceMapURLForScript(script);
+
+    bool hasSourceURL = !script.sourceURL.isEmpty();
+    String scriptURL = hasSourceURL ? script.sourceURL : script.url;
+    bool* hasSourceURLParam = hasSourceURL ? &amp;hasSourceURL : nullptr;
+    String* sourceMapURLParam = script.sourceMappingURL.isNull() ? nullptr : &amp;script.sourceMappingURL;
+    const bool* isContentScript = script.isContentScript ? &amp;script.isContentScript : nullptr;
+    String scriptIDStr = String::number(sourceID);
+    m_frontendDispatcher-&gt;scriptParsed(scriptIDStr, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
+
+    m_scripts.set(sourceID, script);
+
+    if (scriptURL.isEmpty())
+        return;
+
+    for (auto it = m_javaScriptBreakpoints.begin(), end = m_javaScriptBreakpoints.end(); it != end; ++it) {
+        RefPtr&lt;InspectorObject&gt; breakpointObject = it-&gt;value-&gt;asObject();
+        bool isRegex;
+        breakpointObject-&gt;getBoolean(ASCIILiteral(&quot;isRegex&quot;), &amp;isRegex);
+        String url;
+        breakpointObject-&gt;getString(ASCIILiteral(&quot;url&quot;), &amp;url);
+        if (!matches(scriptURL, url, isRegex))
+            continue;
+        ScriptBreakpoint breakpoint;
+        breakpointObject-&gt;getNumber(ASCIILiteral(&quot;lineNumber&quot;), &amp;breakpoint.lineNumber);
+        breakpointObject-&gt;getNumber(ASCIILiteral(&quot;columnNumber&quot;), &amp;breakpoint.columnNumber);
+        breakpointObject-&gt;getString(ASCIILiteral(&quot;condition&quot;), &amp;breakpoint.condition);
+        breakpointObject-&gt;getBoolean(ASCIILiteral(&quot;autoContinue&quot;), &amp;breakpoint.autoContinue);
+        ErrorString errorString;
+        RefPtr&lt;InspectorArray&gt; actions = breakpointObject-&gt;getArray(ASCIILiteral(&quot;actions&quot;));
+        if (!breakpointActionsFromProtocol(&amp;errorString, actions, &amp;breakpoint.actions)) {
+            ASSERT_NOT_REACHED();
+            continue;
+        }
+
+        RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; location = resolveBreakpoint(it-&gt;key, sourceID, breakpoint);
+        if (location)
+            m_frontendDispatcher-&gt;breakpointResolved(it-&gt;key, location);
+    }
+}
+
+void InspectorDebuggerAgent::failedToParseSource(const String&amp; url, const String&amp; data, int firstLine, int errorLine, const String&amp; errorMessage)
+{
+    m_frontendDispatcher-&gt;scriptFailedToParse(url, data, firstLine, errorLine, errorMessage);
+}
+
+void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const Deprecated::ScriptValue&amp; callFrames, const Deprecated::ScriptValue&amp; exception)
+{
+    ASSERT(scriptState &amp;&amp; !m_pausedScriptState);
+    m_pausedScriptState = scriptState;
+    m_currentCallStack = callFrames;
+
+    if (!exception.hasNoValue()) {
+        InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptFor(scriptState);
+        if (!injectedScript.hasNoValue()) {
+            m_breakReason = InspectorDebuggerFrontendDispatcher::Reason::Exception;
+            m_breakAuxData = injectedScript.wrapObject(exception, InspectorDebuggerAgent::backtraceObjectGroup)-&gt;openAccessors();
+            // m_breakAuxData might be null after this.
+        }
+    }
+
+    m_frontendDispatcher-&gt;paused(currentCallFrames(), m_breakReason, m_breakAuxData);
+    m_javaScriptPauseScheduled = false;
+
+    if (m_continueToLocationBreakpointID != JSC::noBreakpointID) {
+        scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointID);
+        m_continueToLocationBreakpointID = JSC::noBreakpointID;
+    }
+
+    if (m_listener)
+        m_listener-&gt;didPause();
+}
+
+void InspectorDebuggerAgent::didSampleProbe(JSC::ExecState* scriptState, int probeIdentifier, int hitCount, const Deprecated::ScriptValue&amp; sample)
+{
+    int sampleId = m_nextProbeSampleId++;
+
+    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptFor(scriptState);
+    RefPtr&lt;TypeBuilder::Runtime::RemoteObject&gt; payload = injectedScript.wrapObject(sample, objectGroupForBreakpointAction(probeIdentifier));
+    RefPtr&lt;TypeBuilder::Debugger::ProbeSample&gt; result = TypeBuilder::Debugger::ProbeSample::create()
+        .setProbeId(probeIdentifier)
+        .setSampleId(sampleId)
+        .setBatchId(hitCount)
+        .setTimestamp(monotonicallyIncreasingTime())
+        .setPayload(payload.release());
+
+    m_frontendDispatcher-&gt;didSampleProbe(result.release());
+}
+
+void InspectorDebuggerAgent::breakpointActionSound()
+{
+    // FIXME: We should send a message to the frontend to make the frontend beep.
+}
+
+void InspectorDebuggerAgent::didContinue()
+{
+    m_pausedScriptState = nullptr;
+    m_currentCallStack = Deprecated::ScriptValue();
+    clearBreakDetails();
+
+    m_frontendDispatcher-&gt;resumed();
+}
+
+void InspectorDebuggerAgent::breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;InspectorObject&gt; data)
+{
+    m_breakReason = breakReason;
+    m_breakAuxData = data;
+    scriptDebugServer().breakProgram();
+}
+
+void InspectorDebuggerAgent::clearResolvedBreakpointState()
+{
+    ErrorString dummyError;
+    Vector&lt;String&gt; breakpointIdentifiers;
+    copyKeysToVector(m_breakpointIdentifierToDebugServerBreakpointIDs, breakpointIdentifiers);
+    for (const String&amp; identifier : breakpointIdentifiers)
+        removeBreakpoint(&amp;dummyError, identifier);
+
+    scriptDebugServer().continueProgram();
+
+    m_pausedScriptState = nullptr;
+    m_currentCallStack = Deprecated::ScriptValue();
+    m_scripts.clear();
+    m_breakpointIdentifierToDebugServerBreakpointIDs.clear();
+    m_continueToLocationBreakpointID = JSC::noBreakpointID;
+    clearBreakDetails();
+    m_javaScriptPauseScheduled = false;
+    setOverlayMessage(&amp;dummyError, nullptr);
+}
+
+bool InspectorDebuggerAgent::assertPaused(ErrorString* errorString)
+{
+    if (!m_pausedScriptState) {
+        *errorString = ASCIILiteral(&quot;Can only perform operation while paused.&quot;);
+        return false;
+    }
+
+    return true;
+}
+
+void InspectorDebuggerAgent::clearBreakDetails()
+{
+    m_breakReason = InspectorDebuggerFrontendDispatcher::Reason::Other;
+    m_breakAuxData = nullptr;
+}
+
+void InspectorDebuggerAgent::didClearGlobalObject()
+{
+    if (m_frontendDispatcher)
+        m_frontendDispatcher-&gt;globalObjectCleared();
+
+    clearResolvedBreakpointState();
+}
+
+} // namespace Inspector
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenthfromrev162797trunkSourceWebCoreinspectorInspectorDebuggerAgenth"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h (from rev 162797, trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h) (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,175 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InspectorDebuggerAgent_h
+#define InspectorDebuggerAgent_h
+
+#if ENABLE(INSPECTOR)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include &quot;InspectorJSBackendDispatchers.h&quot;
+#include &quot;InspectorJSFrontendDispatchers.h&quot;
+#include &quot;bindings/ScriptValue.h&quot;
+#include &quot;debugger/Debugger.h&quot;
+#include &quot;inspector/InspectorAgentBase.h&quot;
+#include &quot;inspector/ScriptBreakpoint.h&quot;
+#include &quot;inspector/ScriptDebugListener.h&quot;
+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/Noncopyable.h&gt;
+#include &lt;wtf/PassOwnPtr.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/text/StringHash.h&gt;
+
+namespace Inspector {
+
+class InjectedScript;
+class InjectedScriptManager;
+class InspectorArray;
+class InspectorObject;
+class InspectorValue;
+class ScriptDebugServer;
+typedef String ErrorString;
+
+class JS_EXPORT_PRIVATE InspectorDebuggerAgent : public InspectorAgentBase, public ScriptDebugListener, public InspectorDebuggerBackendDispatcherHandler {
+    WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent);
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static const char* backtraceObjectGroup;
+
+    virtual ~InspectorDebuggerAgent();
+
+    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) override;
+    virtual void willDestroyFrontendAndBackend(InspectorDisconnectReason) override;
+
+    virtual void enable(ErrorString*) override;
+    virtual void disable(ErrorString*) override;
+    virtual void setBreakpointsActive(ErrorString*, bool active) override;
+    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const RefPtr&lt;Inspector::InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId*, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::Location&gt;&gt;&amp; locations, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers) override;
+    virtual void setBreakpoint(ErrorString*, const RefPtr&lt;Inspector::InspectorObject&gt;&amp; location, const RefPtr&lt;Inspector::InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId*, RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt;&amp; actualLocation, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers) override;
+    virtual void removeBreakpoint(ErrorString*, const String&amp; breakpointIdentifier) override;
+    virtual void continueToLocation(ErrorString*, const RefPtr&lt;InspectorObject&gt;&amp; location) override;
+    virtual void searchInContent(ErrorString*, const String&amp; scriptID, const String&amp; query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::GenericTypes::SearchMatch&gt;&gt;&amp;) override;
+    virtual void getScriptSource(ErrorString*, const String&amp; scriptID, String* scriptSource) override;
+    virtual void getFunctionDetails(ErrorString*, const String&amp; functionId, RefPtr&lt;Inspector::TypeBuilder::Debugger::FunctionDetails&gt;&amp;) override;
+    virtual void pause(ErrorString*) override;
+    virtual void resume(ErrorString*) override;
+    virtual void stepOver(ErrorString*) override;
+    virtual void stepInto(ErrorString*) override;
+    virtual void stepOut(ErrorString*) override;
+    virtual void setPauseOnExceptions(ErrorString*, const String&amp; pauseState) override;
+    virtual void evaluateOnCallFrame(ErrorString*, const String&amp; callFrameId, const String&amp; expression, const String* objectGroup, const bool* includeCommandLineAPI, const bool* doNotPauseOnExceptionsAndMuteConsole, const bool* returnByValue, const bool* generatePreview, RefPtr&lt;Inspector::TypeBuilder::Runtime::RemoteObject&gt;&amp; result, Inspector::TypeBuilder::OptOutput&lt;bool&gt;* wasThrown) override;
+    virtual void setOverlayMessage(ErrorString*, const String*) override;
+
+    bool isPaused();
+    
+    void handleConsoleAssert();
+
+    void schedulePauseOnNextStatement(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;InspectorObject&gt; data);
+    void cancelPauseOnNextStatement();
+    void breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;InspectorObject&gt; data);
+    void scriptExecutionBlockedByCSP(const String&amp; directiveText);
+
+    class Listener {
+    public:
+        virtual ~Listener() { }
+        virtual void debuggerWasEnabled() = 0;
+        virtual void debuggerWasDisabled() = 0;
+        virtual void stepInto() = 0;
+        virtual void didPause() = 0;
+    };
+    void setListener(Listener* listener) { m_listener = listener; }
+
+    virtual ScriptDebugServer&amp; scriptDebugServer() = 0;
+
+protected:
+    InspectorDebuggerAgent(InjectedScriptManager*);
+
+    InjectedScriptManager* injectedScriptManager() const { return m_injectedScriptManager; }
+    virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) = 0;
+
+    virtual void startListeningScriptDebugServer() = 0;
+    virtual void stopListeningScriptDebugServer(bool skipRecompile) = 0;
+    virtual void muteConsole() = 0;
+    virtual void unmuteConsole() = 0;
+
+    virtual void enable();
+    virtual void disable(bool skipRecompile);
+    virtual void didPause(JSC::ExecState*, const Deprecated::ScriptValue&amp; callFrames, const Deprecated::ScriptValue&amp; exception) override;
+    virtual void didContinue() override;
+
+    virtual String sourceMapURLForScript(const Script&amp;);
+
+    void didClearGlobalObject();
+
+private:
+    PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;&gt; currentCallFrames();
+
+    virtual void didParseSource(JSC::SourceID, const Script&amp;) override final;
+    virtual void failedToParseSource(const String&amp; url, const String&amp; data, int firstLine, int errorLine, const String&amp; errorMessage) override final;
+    virtual void didSampleProbe(JSC::ExecState*, int probeIdentifier, int hitCount, const Deprecated::ScriptValue&amp; sample) override final;
+
+    virtual void breakpointActionSound() override;
+
+    PassRefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; resolveBreakpoint(const String&amp; breakpointIdentifier, JSC::SourceID, const ScriptBreakpoint&amp;);
+    bool assertPaused(ErrorString*);
+    void clearResolvedBreakpointState();
+    void clearBreakDetails();
+
+    bool breakpointActionsFromProtocol(ErrorString*, RefPtr&lt;InspectorArray&gt;&amp; actions, Vector&lt;ScriptBreakpointAction&gt;* result);
+
+    typedef HashMap&lt;JSC::SourceID, Script&gt; ScriptsMap;
+    typedef HashMap&lt;String, Vector&lt;JSC::BreakpointID&gt;&gt; BreakpointIdentifierToDebugServerBreakpointIDsMap;
+    typedef HashMap&lt;String, RefPtr&lt;InspectorObject&gt;&gt; BreakpointIdentifierToBreakpointMap;
+
+    InjectedScriptManager* m_injectedScriptManager;
+    std::unique_ptr&lt;InspectorDebuggerFrontendDispatcher&gt; m_frontendDispatcher;
+    RefPtr&lt;InspectorDebuggerBackendDispatcher&gt; m_backendDispatcher;
+    Listener* m_listener;
+    JSC::ExecState* m_pausedScriptState;
+    Deprecated::ScriptValue m_currentCallStack;
+    ScriptsMap m_scripts;
+    BreakpointIdentifierToDebugServerBreakpointIDsMap m_breakpointIdentifierToDebugServerBreakpointIDs;
+    BreakpointIdentifierToBreakpointMap m_javaScriptBreakpoints;
+    JSC::BreakpointID m_continueToLocationBreakpointID;
+    InspectorDebuggerFrontendDispatcher::Reason::Enum m_breakReason;
+    RefPtr&lt;InspectorObject&gt; m_breakAuxData;
+    bool m_enabled;
+    bool m_javaScriptPauseScheduled;
+    int m_nextProbeSampleId;
+    int m_nextBreakpointActionIdentifier;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+#endif // ENABLE(INSPECTOR)
+
+#endif // !defined(InspectorDebuggerAgent_h)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgentcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSGlobalObjectDebuggerAgent.h&quot;
+
+#if ENABLE(INSPECTOR)
+
+#include &quot;InjectedScriptManager.h&quot;
+#include &quot;JSGlobalObject.h&quot;
+
+using namespace JSC;
+
+namespace Inspector {
+
+JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent(InjectedScriptManager* injectedScriptManager, JSC::JSGlobalObject&amp; globalObject)
+    : InspectorDebuggerAgent(injectedScriptManager)
+    , m_scriptDebugServer(globalObject)
+{
+}
+
+void JSGlobalObjectDebuggerAgent::startListeningScriptDebugServer()
+{
+    scriptDebugServer().addListener(this);
+}
+
+void JSGlobalObjectDebuggerAgent::stopListeningScriptDebugServer(bool isBeingDestroyed)
+{
+    scriptDebugServer().removeListener(this, isBeingDestroyed);
+}
+
+InjectedScript JSGlobalObjectDebuggerAgent::injectedScriptForEval(ErrorString* error, const int* executionContextId)
+{
+    if (executionContextId) {
+        *error = ASCIILiteral(&quot;Execution context id is not supported for JSContext inspection as there is only one execution context.&quot;);
+        return InjectedScript();
+    }
+
+    ExecState* exec = m_scriptDebugServer.globalObject().globalExec();
+    return injectedScriptManager()-&gt;injectedScriptFor(exec);
+}
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsJSGlobalObjectDebuggerAgenth"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSGlobalObjectDebuggerAgent_h
+#define JSGlobalObjectDebuggerAgent_h
+
+#if ENABLE(INSPECTOR)
+
+#include &quot;InspectorDebuggerAgent.h&quot;
+#include &quot;JSGlobalObjectScriptDebugServer.h&quot;
+
+namespace Inspector {
+
+class JSGlobalObjectDebuggerAgent final : public InspectorDebuggerAgent {
+    WTF_MAKE_NONCOPYABLE(JSGlobalObjectDebuggerAgent);
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    JSGlobalObjectDebuggerAgent(InjectedScriptManager*, JSC::JSGlobalObject&amp;);
+    virtual ~JSGlobalObjectDebuggerAgent() { }
+
+    virtual JSGlobalObjectScriptDebugServer&amp; scriptDebugServer() override { return m_scriptDebugServer; }
+
+    virtual void startListeningScriptDebugServer() override;
+    virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) override;
+    virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) override;
+
+    // FIXME: This needs a ConsoleAgent to send a log to.
+    virtual void breakpointActionLog(JSC::ExecState*, const String&amp;) override final { }
+
+    // FIXME: JavaScript inspector does not yet have a console object to mute.
+    virtual void muteConsole() override { }
+    virtual void unmuteConsole() override { }
+
+private:
+    JSGlobalObjectScriptDebugServer m_scriptDebugServer;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR)
+
+#endif // !defined(JSGlobalObjectDebuggerAgent_h)
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -1587,7 +1587,6 @@
</span><span class="cx">     inspector/InspectorDOMStorageAgent.cpp
</span><span class="cx">     inspector/InspectorDatabaseAgent.cpp
</span><span class="cx">     inspector/InspectorDatabaseResource.cpp
</span><del>-    inspector/InspectorDebuggerAgent.cpp
</del><span class="cx">     inspector/InspectorFrontendClientLocal.cpp
</span><span class="cx">     inspector/InspectorFrontendHost.cpp
</span><span class="cx">     inspector/InspectorHeapProfilerAgent.cpp
</span><span class="lines">@@ -1618,6 +1617,7 @@
</span><span class="cx">     inspector/ScriptCallFrame.cpp
</span><span class="cx">     inspector/ScriptCallStack.cpp
</span><span class="cx">     inspector/TimelineRecordFactory.cpp
</span><ins>+    inspector/WebDebuggerAgent.cpp
</ins><span class="cx">     inspector/WorkerConsoleAgent.cpp
</span><span class="cx">     inspector/WorkerDebuggerAgent.cpp
</span><span class="cx">     inspector/WorkerInspectorController.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/ChangeLog        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -1,3 +1,67 @@
</span><ins>+2014-01-26  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Move InspectorDebuggerAgent into JavaScriptCore
+        https://bugs.webkit.org/show_bug.cgi?id=127629
+
+        Rubber-stamped by Sam Weinig.
+
+        Test: inspector-protocol/debugger/pause-on-assert.html
+
+        * CMakeLists.txt:
+        * ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h: Added.
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * inspector/InspectorAllInOne.cpp:
+        - Remove InspectorDebuggerAgent.
+        - Add WebDebuggerAgent (shared between Page and Worker).
+
+        * inspector/WebDebuggerAgent.h: Added.
+        (WebCore::WebDebuggerAgent::~WebDebuggerAgent):
+        * inspector/WebDebuggerAgent.cpp: Added.
+        (WebCore::WebDebuggerAgent::WebDebuggerAgent):
+        (WebCore::WebDebuggerAgent::enable):
+        (WebCore::WebDebuggerAgent::disable):
+        Shared code for Page and Worker debugger agents.
+        Instrumenting agents is a concept in WebCore only,
+        and the Debugger agent is only in the instrumenting
+        agents list when it is enabled and removed when disabled.
+
+        * inspector/InstrumentingAgents.h:
+        (WebCore::InstrumentingAgents::inspectorDebuggerAgent):
+        (WebCore::InstrumentingAgents::setInspectorDebuggerAgent):
+        * inspector/InspectorDOMDebuggerAgent.cpp:
+        * inspector/InspectorDOMDebuggerAgent.h:
+        Update namespace for debugger agent.
+
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::isConsoleAssertMessage):
+        (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
+        DebuggerAgent in JavaScriptCore does not yet know about console
+        types. So temporarily handle it here. We need to give JavaScriptCore
+        some concept of Console messages and types.
+
+        * inspector/PageDebuggerAgent.cpp:
+        (WebCore::PageDebuggerAgent::PageDebuggerAgent):
+        (WebCore::PageDebuggerAgent::enable):
+        (WebCore::PageDebuggerAgent::disable):
+        (WebCore::PageDebuggerAgent::sourceMapURLForScript):
+        (WebCore::PageDebuggerAgent::injectedScriptForEval):
+        * inspector/PageDebuggerAgent.h:
+        * inspector/WorkerDebuggerAgent.cpp:
+        (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
+        (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
+        * inspector/WorkerDebuggerAgent.h:
+        Modernize the Page and Worker debugger agents.
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        * inspector/InspectorController.h:
+        * inspector/WorkerInspectorController.cpp:
+        (WebCore::WorkerInspectorController::WorkerInspectorController):
+        New constructors for the debugger agents.
+
</ins><span class="cx"> 2014-01-25  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove dead code from the JSC profiler.
</span></span></pre></div>
<a id="trunkSourceWebCoreForwardingHeadersinspectoragentsInspectorDebuggerAgenth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h                                (rev 0)
+++ trunk/Source/WebCore/ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+#ifndef WebCore_FWD_InspectorDebuggerAgent_h
+#define WebCore_FWD_InspectorDebuggerAgent_h
+#include &lt;JavaScriptCore/InspectorDebuggerAgent.h&gt;
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -3785,8 +3785,6 @@
</span><span class="cx">         Source/WebCore/inspector/InspectorDatabaseInstrumentation.h \
</span><span class="cx">         Source/WebCore/inspector/InspectorDatabaseResource.cpp \
</span><span class="cx">         Source/WebCore/inspector/InspectorDatabaseResource.h \
</span><del>-        Source/WebCore/inspector/InspectorDebuggerAgent.cpp \
-        Source/WebCore/inspector/InspectorDebuggerAgent.h \
</del><span class="cx">         Source/WebCore/inspector/InspectorDOMAgent.cpp \
</span><span class="cx">         Source/WebCore/inspector/InspectorDOMAgent.h \
</span><span class="cx">         Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp \
</span><span class="lines">@@ -3857,6 +3855,8 @@
</span><span class="cx">         Source/WebCore/inspector/ScriptCallStack.h \
</span><span class="cx">         Source/WebCore/inspector/TimelineRecordFactory.cpp \
</span><span class="cx">         Source/WebCore/inspector/TimelineRecordFactory.h \
</span><ins>+        Source/WebCore/inspector/WebDebuggerAgent.cpp \
+        Source/WebCore/inspector/WebDebuggerAgent.h \
</ins><span class="cx">         Source/WebCore/inspector/WorkerConsoleAgent.cpp \
</span><span class="cx">         Source/WebCore/inspector/WorkerConsoleAgent.h \
</span><span class="cx">         Source/WebCore/inspector/WorkerDebuggerAgent.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -17626,14 +17626,6 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\inspector\InspectorDebuggerAgent.cpp&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\InspectorDOMAgent.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -17898,6 +17890,14 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\inspector\WebDebuggerAgent.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\WorkerConsoleAgent.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -20853,7 +20853,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDatabaseAgent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDatabaseInstrumentation.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDatabaseResource.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\inspector\InspectorDebuggerAgent.h&quot; /&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDOMAgent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDOMDebuggerAgent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDOMStorageAgent.h&quot; /&gt;
</span><span class="lines">@@ -20891,6 +20890,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\ScriptCallFrame.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\ScriptCallStack.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\TimelineRecordFactory.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\inspector\WebDebuggerAgent.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\WorkerConsoleAgent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\WorkerDebuggerAgent.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\WorkerInspectorController.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -4767,9 +4767,6 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\InspectorDatabaseResource.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\inspector\InspectorDebuggerAgent.cpp&quot;&gt;
-      &lt;Filter&gt;inspector&lt;/Filter&gt;
-    &lt;/ClCompile&gt;
</del><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\InspectorDOMAgent.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -4866,6 +4863,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\TimelineRecordFactory.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\inspector\WebDebuggerAgent.cpp&quot;&gt;
+      &lt;Filter&gt;inspector&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\inspector\WorkerConsoleAgent.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -12296,9 +12296,6 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDatabaseResource.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\inspector\InspectorDebuggerAgent.h&quot;&gt;
-      &lt;Filter&gt;inspector&lt;/Filter&gt;
-    &lt;/ClInclude&gt;
</del><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\InspectorDOMAgent.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="lines">@@ -12410,6 +12407,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\TimelineRecordFactory.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\inspector\WebDebuggerAgent.h&quot;&gt;
+      &lt;Filter&gt;inspector&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\inspector\WorkerConsoleAgent.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;inspector&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -3644,6 +3644,8 @@
</span><span class="cx">                 A5C566AB127A3AAD00E8A3FF /* DiskImageCacheClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C566AA127A3AAD00E8A3FF /* DiskImageCacheClientIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A5DEBDA316FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5DEBD9F16FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.cpp */; };
</span><span class="cx">                 A5DEBDA416FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A5DEBDA016FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.h */; };
</span><ins>+                A5E616731894581F009ADF50 /* WebDebuggerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5E616711894581F009ADF50 /* WebDebuggerAgent.cpp */; };
+                A5E616741894581F009ADF50 /* WebDebuggerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A5E616721894581F009ADF50 /* WebDebuggerAgent.h */; };
</ins><span class="cx">                 A5F6E16B132ED46E008EDAE3 /* Autocapitalize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5F6E16C132ED46E008EDAE3 /* Autocapitalize.cpp */; };
</span><span class="cx">                 A5F9EF701266750D00FCCF52 /* DiskImageCacheIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5F9EF6E1266750D00FCCF52 /* DiskImageCacheIOS.mm */; };
</span><span class="cx">                 A5F9EF711266750D00FCCF52 /* DiskImageCacheIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = A5F9EF6F1266750D00FCCF52 /* DiskImageCacheIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -6018,8 +6020,6 @@
</span><span class="cx">                 F3335BF812E07DC300D33011 /* InspectorConsoleAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */; };
</span><span class="cx">                 F3335BF912E07DC300D33011 /* InspectorConsoleAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */; };
</span><span class="cx">                 F33F0282120947F200E5743A /* ScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F33F0281120947F200E5743A /* ScriptProfile.cpp */; };
</span><del>-                F33F053D120B0DA500E5743A /* InspectorDebuggerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F33F053B120B0DA500E5743A /* InspectorDebuggerAgent.cpp */; };
-                F33F053E120B0DA500E5743A /* InspectorDebuggerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = F33F053C120B0DA500E5743A /* InspectorDebuggerAgent.h */; };
</del><span class="cx">                 F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */ = {isa = PBXBuildFile; fileRef = F344C75211294D9D00F26EEE /* InspectorFrontendClientLocal.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 F344C75811294FF600F26EEE /* InspectorFrontendClientLocal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F344C75711294FF600F26EEE /* InspectorFrontendClientLocal.cpp */; };
</span><span class="lines">@@ -10608,6 +10608,8 @@
</span><span class="cx">                 A5DEBD9F16FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitPlaybackTargetAvailabilityEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5DEBDA016FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitPlaybackTargetAvailabilityEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5DEBDA116FB908700836FE0 /* WebKitPlaybackTargetAvailabilityEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitPlaybackTargetAvailabilityEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A5E616711894581F009ADF50 /* WebDebuggerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebDebuggerAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A5E616721894581F009ADF50 /* WebDebuggerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDebuggerAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A5F6E16C132ED46E008EDAE3 /* Autocapitalize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Autocapitalize.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5F9EF6E1266750D00FCCF52 /* DiskImageCacheIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DiskImageCacheIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5F9EF6F1266750D00FCCF52 /* DiskImageCacheIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiskImageCacheIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -13325,8 +13327,6 @@
</span><span class="cx">                 F3335BF612E07DC300D33011 /* InspectorConsoleAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorConsoleAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F3335BF712E07DC300D33011 /* InspectorConsoleAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorConsoleAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F33F0281120947F200E5743A /* ScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProfile.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                F33F053B120B0DA500E5743A /* InspectorDebuggerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDebuggerAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                F33F053C120B0DA500E5743A /* InspectorDebuggerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDebuggerAgent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F344C75211294D9D00F26EEE /* InspectorFrontendClientLocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendClientLocal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F344C75711294FF600F26EEE /* InspectorFrontendClientLocal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontendClientLocal.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -14803,8 +14803,6 @@
</span><span class="cx">                                 F3F5CF1212ED81B30084C569 /* InspectorDatabaseInstrumentation.h */,
</span><span class="cx">                                 41F062130F5F192600A07EAC /* InspectorDatabaseResource.cpp */,
</span><span class="cx">                                 41F062120F5F192600A07EAC /* InspectorDatabaseResource.h */,
</span><del>-                                F33F053B120B0DA500E5743A /* InspectorDebuggerAgent.cpp */,
-                                F33F053C120B0DA500E5743A /* InspectorDebuggerAgent.h */,
</del><span class="cx">                                 7A2458791021EAF4000A00AA /* InspectorDOMAgent.cpp */,
</span><span class="cx">                                 7A24587A1021EAF4000A00AA /* InspectorDOMAgent.h */,
</span><span class="cx">                                 F3D4C47612E07663003DA150 /* InspectorDOMDebuggerAgent.cpp */,
</span><span class="lines">@@ -14881,6 +14879,8 @@
</span><span class="cx">                                 9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
</span><span class="cx">                                 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
</span><span class="cx">                                 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
</span><ins>+                                A5E616711894581F009ADF50 /* WebDebuggerAgent.cpp */,
+                                A5E616721894581F009ADF50 /* WebDebuggerAgent.h */,
</ins><span class="cx">                                 F382088E147D35F90010BC06 /* WorkerConsoleAgent.cpp */,
</span><span class="cx">                                 F382088F147D35F90010BC06 /* WorkerConsoleAgent.h */,
</span><span class="cx">                                 F34742DE1343631F00531BC2 /* WorkerDebuggerAgent.cpp */,
</span><span class="lines">@@ -23917,7 +23917,6 @@
</span><span class="cx">                                 7AB0B1C11211A62200A76940 /* InspectorDatabaseAgent.h in Headers */,
</span><span class="cx">                                 F3F5CF1312ED81B30084C569 /* InspectorDatabaseInstrumentation.h in Headers */,
</span><span class="cx">                                 41F062140F5F192600A07EAC /* InspectorDatabaseResource.h in Headers */,
</span><del>-                                F33F053E120B0DA500E5743A /* InspectorDebuggerAgent.h in Headers */,
</del><span class="cx">                                 7A24587C1021EAF4000A00AA /* InspectorDOMAgent.h in Headers */,
</span><span class="cx">                                 5164ED44183208C700EA8FF1 /* IDBServerConnectionLevelDB.h in Headers */,
</span><span class="cx">                                 F3D4C47912E07663003DA150 /* InspectorDOMDebuggerAgent.h in Headers */,
</span><span class="lines">@@ -24689,6 +24688,7 @@
</span><span class="cx">                                 14115B5209F84B7100CA4FC1 /* Node.h in Headers */,
</span><span class="cx">                                 854FE7310A2297BE0058D7AD /* NodeFilter.h in Headers */,
</span><span class="cx">                                 854FE7330A2297BE0058D7AD /* NodeFilterCondition.h in Headers */,
</span><ins>+                                A5E616741894581F009ADF50 /* WebDebuggerAgent.h in Headers */,
</ins><span class="cx">                                 854FE7350A2297BE0058D7AD /* NodeIterator.h in Headers */,
</span><span class="cx">                                 A818721B0977D3C0005826D9 /* NodeList.h in Headers */,
</span><span class="cx">                                 63189AE30E83A33300012E41 /* NodeRareData.h in Headers */,
</span><span class="lines">@@ -26917,6 +26917,7 @@
</span><span class="cx">                                 078E090B17D14CEE00420AA1 /* RTCPeerConnection.cpp in Sources */,
</span><span class="cx">                                 84730D7C1248F0B300D3A9C9 /* FEDisplacementMap.cpp in Sources */,
</span><span class="cx">                                 4358E8801360A31700E4748C /* FEDropShadow.cpp in Sources */,
</span><ins>+                                A5E616731894581F009ADF50 /* WebDebuggerAgent.cpp in Sources */,
</ins><span class="cx">                                 51D719F9181106E00016DC51 /* PageGroupIndexedDatabase.cpp in Sources */,
</span><span class="cx">                                 84730D7E1248F0B300D3A9C9 /* FEFlood.cpp in Sources */,
</span><span class="cx">                                 84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */,
</span><span class="lines">@@ -27245,7 +27246,6 @@
</span><span class="cx">                                 4A9CC82016BF9BB400EC645A /* InspectorCSSOMWrappers.cpp in Sources */,
</span><span class="cx">                                 7AB0B1C01211A62200A76940 /* InspectorDatabaseAgent.cpp in Sources */,
</span><span class="cx">                                 41F062150F5F192600A07EAC /* InspectorDatabaseResource.cpp in Sources */,
</span><del>-                                F33F053D120B0DA500E5743A /* InspectorDebuggerAgent.cpp in Sources */,
</del><span class="cx">                                 7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */,
</span><span class="cx">                                 0FC4E40F187F82E10045882C /* ScrollingTreeIOS.cpp in Sources */,
</span><span class="cx">                                 F3D4C47812E07663003DA150 /* InspectorDOMDebuggerAgent.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorAllInOne.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorAllInOne.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorAllInOne.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> #include &quot;InspectorDOMStorageAgent.cpp&quot;
</span><span class="cx"> #include &quot;InspectorDatabaseAgent.cpp&quot;
</span><span class="cx"> #include &quot;InspectorDatabaseResource.cpp&quot;
</span><del>-#include &quot;InspectorDebuggerAgent.cpp&quot;
</del><span class="cx"> #include &quot;InspectorFrontendClientLocal.cpp&quot;
</span><span class="cx"> #include &quot;InspectorFrontendHost.cpp&quot;
</span><span class="cx"> #include &quot;InspectorHeapProfilerAgent.cpp&quot;
</span><span class="lines">@@ -75,6 +74,7 @@
</span><span class="cx"> #include &quot;ScriptCallFrame.cpp&quot;
</span><span class="cx"> #include &quot;ScriptCallStack.cpp&quot;
</span><span class="cx"> #include &quot;TimelineRecordFactory.cpp&quot;
</span><ins>+#include &quot;WebDebuggerAgent.cpp&quot;
</ins><span class="cx"> #include &quot;WorkerConsoleAgent.cpp&quot;
</span><span class="cx"> #include &quot;WorkerDebuggerAgent.cpp&quot;
</span><span class="cx"> #include &quot;WorkerInspectorController.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx"> #include &quot;InspectorDOMDebuggerAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMStorageAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDatabaseAgent.h&quot;
</span><del>-#include &quot;InspectorDebuggerAgent.h&quot;
</del><span class="cx"> #include &quot;InspectorFrontendClient.h&quot;
</span><span class="cx"> #include &quot;InspectorHeapProfilerAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorIndexedDBAgent.h&quot;
</span><span class="lines">@@ -147,7 +146,7 @@
</span><span class="cx">     m_agents.append(std::move(consoleAgentPtr));
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    auto debuggerAgentPtr = std::make_unique&lt;PageDebuggerAgent&gt;(m_instrumentingAgents.get(), pageAgent, m_injectedScriptManager.get(), m_overlay.get());
</del><ins>+    auto debuggerAgentPtr = std::make_unique&lt;PageDebuggerAgent&gt;(m_injectedScriptManager.get(), m_instrumentingAgents.get(), pageAgent, m_overlay.get());
</ins><span class="cx">     m_debuggerAgent = debuggerAgentPtr.get();
</span><span class="cx">     m_agents.append(std::move(debuggerAgentPtr));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.h (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.h        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorController.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -44,9 +44,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace Inspector {
</span><span class="cx"> class InspectorAgent;
</span><ins>+class InspectorBackendDispatcher;
+class InspectorDebuggerAgent;
+class InspectorFrontendChannel;
</ins><span class="cx"> class InspectorObject;
</span><del>-class InspectorFrontendChannel;
-class InspectorBackendDispatcher;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -58,7 +59,6 @@
</span><span class="cx"> class InspectorClient;
</span><span class="cx"> class InspectorDOMAgent;
</span><span class="cx"> class InspectorDOMDebuggerAgent;
</span><del>-class InspectorDebuggerAgent;
</del><span class="cx"> class InspectorFrontendClient;
</span><span class="cx"> class InspectorMemoryAgent;
</span><span class="cx"> class InspectorOverlay;
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">     InspectorPageAgent* m_pageAgent;
</span><span class="cx">     InspectorMemoryAgent* m_memoryAgent;
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    InspectorDebuggerAgent* m_debuggerAgent;
</del><ins>+    Inspector::InspectorDebuggerAgent* m_debuggerAgent;
</ins><span class="cx">     InspectorDOMDebuggerAgent* m_domDebuggerAgent;
</span><span class="cx">     InspectorProfilerAgent* m_profilerAgent;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -29,14 +29,12 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><ins>+#include &quot;InspectorDOMDebuggerAgent.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR) &amp;&amp; ENABLE(JAVASCRIPT_DEBUGGER)
</span><span class="cx"> 
</span><del>-#include &quot;InspectorDOMDebuggerAgent.h&quot;
-
</del><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMAgent.h&quot;
</span><del>-#include &quot;InspectorDebuggerAgent.h&quot;
</del><span class="cx"> #include &quot;InspectorInstrumentation.h&quot;
</span><span class="cx"> #include &quot;InspectorWebFrontendDispatchers.h&quot;
</span><span class="cx"> #include &quot;InstrumentingAgents.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -33,9 +33,9 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><del>-#include &quot;InspectorDebuggerAgent.h&quot;
</del><span class="cx"> #include &quot;InspectorWebAgentBase.h&quot;
</span><span class="cx"> #include &quot;InspectorWebBackendDispatchers.h&quot;
</span><ins>+#include &lt;inspector/agents/InspectorDebuggerAgent.h&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/PassOwnPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="lines">@@ -49,16 +49,15 @@
</span><span class="cx"> 
</span><span class="cx"> class Element;
</span><span class="cx"> class InspectorDOMAgent;
</span><del>-class InspectorDebuggerAgent;
</del><span class="cx"> class InstrumentingAgents;
</span><span class="cx"> class Node;
</span><span class="cx"> 
</span><span class="cx"> typedef String ErrorString;
</span><span class="cx"> 
</span><del>-class InspectorDOMDebuggerAgent : public InspectorAgentBase, public InspectorDebuggerAgent::Listener, public Inspector::InspectorDOMDebuggerBackendDispatcherHandler {
</del><ins>+class InspectorDOMDebuggerAgent : public InspectorAgentBase, public Inspector::InspectorDebuggerAgent::Listener, public Inspector::InspectorDOMDebuggerBackendDispatcherHandler {
</ins><span class="cx">     WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
</span><span class="cx"> public:
</span><del>-    InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorDOMAgent*, InspectorDebuggerAgent*);
</del><ins>+    InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorDOMAgent*, Inspector::InspectorDebuggerAgent*);
</ins><span class="cx">     virtual ~InspectorDOMDebuggerAgent();
</span><span class="cx"> 
</span><span class="cx">     // DOMDebugger API
</span><span class="lines">@@ -86,7 +85,7 @@
</span><span class="cx">     virtual void discardAgent() override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    // InspectorDebuggerAgent::Listener implementation.
</del><ins>+    // Inspector::InspectorDebuggerAgent::Listener implementation.
</ins><span class="cx">     virtual void debuggerWasEnabled() override;
</span><span class="cx">     virtual void debuggerWasDisabled() override;
</span><span class="cx">     virtual void stepInto() override;
</span><span class="lines">@@ -103,7 +102,7 @@
</span><span class="cx">     void clear();
</span><span class="cx"> 
</span><span class="cx">     InspectorDOMAgent* m_domAgent;
</span><del>-    InspectorDebuggerAgent* m_debuggerAgent;
</del><ins>+    Inspector::InspectorDebuggerAgent* m_debuggerAgent;
</ins><span class="cx">     RefPtr&lt;Inspector::InspectorDOMDebuggerBackendDispatcher&gt; m_backendDispatcher;
</span><span class="cx">     HashMap&lt;Node*, uint32_t&gt; m_domBreakpoints;
</span><span class="cx">     HashSet&lt;String&gt; m_eventListenerBreakpoints;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDebuggerAgentcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -1,761 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
- * Copyright (C) 2010-2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;InspectorDebuggerAgent.h&quot;
-
-#if ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
-
-#include &quot;CachedResource.h&quot;
-#include &quot;InspectorPageAgent.h&quot;
-#include &quot;InstrumentingAgents.h&quot;
-#include &quot;ScriptArguments.h&quot;
-#include &quot;Sound.h&quot;
-#include &lt;bindings/ScriptObject.h&gt;
-#include &lt;bindings/ScriptValue.h&gt;
-#include &lt;inspector/ContentSearchUtilities.h&gt;
-#include &lt;inspector/InjectedScript.h&gt;
-#include &lt;inspector/InjectedScriptManager.h&gt;
-#include &lt;inspector/InspectorValues.h&gt;
-#include &lt;inspector/ScriptDebugServer.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-#include &lt;yarr/RegularExpression.h&gt;
-
-using Inspector::TypeBuilder::Array;
-using Inspector::TypeBuilder::Debugger::FunctionDetails;
-using Inspector::TypeBuilder::Debugger::ScriptId;
-using Inspector::TypeBuilder::Runtime::RemoteObject;
-
-using namespace Inspector;
-
-namespace WebCore {
-
-const char* InspectorDebuggerAgent::backtraceObjectGroup = &quot;backtrace&quot;;
-
-static String objectGroupForBreakpointAction(int identifier)
-{
-    DEFINE_STATIC_LOCAL(const AtomicString, objectGroup, (&quot;breakpoint-action-&quot;, AtomicString::ConstructFromLiteral));
-    return makeString(objectGroup, String::number(identifier));
-}
-
-InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager)
-    : InspectorAgentBase(ASCIILiteral(&quot;Debugger&quot;), instrumentingAgents)
-    , m_injectedScriptManager(injectedScriptManager)
-    , m_pausedScriptState(nullptr)
-    , m_continueToLocationBreakpointID(JSC::noBreakpointID)
-    , m_enabled(false)
-    , m_javaScriptPauseScheduled(false)
-    , m_listener(nullptr)
-    , m_nextProbeSampleId(1)
-    , m_nextBreakpointActionIdentifier(1)
-{
-    // FIXME: make breakReason optional so that there was no need to init it with &quot;other&quot;.
-    clearBreakDetails();
-}
-
-InspectorDebuggerAgent::~InspectorDebuggerAgent()
-{
-    ASSERT(!m_instrumentingAgents-&gt;inspectorDebuggerAgent());
-}
-
-void InspectorDebuggerAgent::enable()
-{
-    m_instrumentingAgents-&gt;setInspectorDebuggerAgent(this);
-
-    scriptDebugServer().setBreakpointsActivated(true);
-    startListeningScriptDebugServer();
-
-    if (m_listener)
-        m_listener-&gt;debuggerWasEnabled();
-
-    m_enabled = true;
-}
-
-void InspectorDebuggerAgent::disable(bool isBeingDestroyed)
-{
-    m_javaScriptBreakpoints.clear();
-    m_instrumentingAgents-&gt;setInspectorDebuggerAgent(nullptr);
-
-    stopListeningScriptDebugServer(isBeingDestroyed);
-    clearResolvedBreakpointState();
-
-    if (m_listener)
-        m_listener-&gt;debuggerWasDisabled();
-
-    m_enabled = false;
-}
-
-void InspectorDebuggerAgent::enable(ErrorString*)
-{
-    if (m_enabled)
-        return;
-
-    enable();
-
-    ASSERT(m_frontendDispatcher);
-}
-
-void InspectorDebuggerAgent::disable(ErrorString*)
-{
-    if (!m_enabled)
-        return;
-
-    bool skipRecompile = false;
-    disable(skipRecompile);
-}
-
-void InspectorDebuggerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
-{
-    m_frontendDispatcher = std::make_unique&lt;InspectorDebuggerFrontendDispatcher&gt;(frontendChannel);
-    m_backendDispatcher = InspectorDebuggerBackendDispatcher::create(backendDispatcher, this);
-}
-
-void InspectorDebuggerAgent::willDestroyFrontendAndBackend(InspectorDisconnectReason reason)
-{
-    m_frontendDispatcher = nullptr;
-    m_backendDispatcher.clear();
-
-    bool skipRecompile = reason == InspectorDisconnectReason::InspectedTargetDestroyed;
-    disable(skipRecompile);
-}
-
-void InspectorDebuggerAgent::setBreakpointsActive(ErrorString*, bool active)
-{
-    if (active)
-        scriptDebugServer().activateBreakpoints();
-    else
-        scriptDebugServer().deactivateBreakpoints();
-}
-
-bool InspectorDebuggerAgent::isPaused()
-{
-    return scriptDebugServer().isPaused();
-}
-
-void InspectorDebuggerAgent::addMessageToConsole(MessageSource source, MessageType type)
-{
-    if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontPauseOnExceptions &amp;&amp; source == ConsoleAPIMessageSource &amp;&amp; type == AssertMessageType)
-        breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Assert, nullptr);
-}
-
-static PassRefPtr&lt;InspectorObject&gt; buildObjectForBreakpointCookie(const String&amp; url, int lineNumber, int columnNumber, const String&amp; condition, RefPtr&lt;InspectorArray&gt;&amp; actions, bool isRegex, bool autoContinue)
-{
-    RefPtr&lt;InspectorObject&gt; breakpointObject = InspectorObject::create();
-    breakpointObject-&gt;setString(&quot;url&quot;, url);
-    breakpointObject-&gt;setNumber(&quot;lineNumber&quot;, lineNumber);
-    breakpointObject-&gt;setNumber(&quot;columnNumber&quot;, columnNumber);
-    breakpointObject-&gt;setString(&quot;condition&quot;, condition);
-    breakpointObject-&gt;setBoolean(&quot;isRegex&quot;, isRegex);
-    breakpointObject-&gt;setBoolean(&quot;autoContinue&quot;, autoContinue);
-    if (actions)
-        breakpointObject-&gt;setArray(&quot;actions&quot;, actions);
-
-    return breakpointObject;
-}
-
-static bool matches(const String&amp; url, const String&amp; pattern, bool isRegex)
-{
-    if (isRegex) {
-        JSC::Yarr::RegularExpression regex(pattern, TextCaseSensitive);
-        return regex.match(url) != -1;
-    }
-    return url == pattern;
-}
-
-static bool breakpointActionTypeForString(const String&amp; typeString, ScriptBreakpointActionType* output)
-{
-    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Log)) {
-        *output = ScriptBreakpointActionTypeLog;
-        return true;
-    }
-    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Evaluate)) {
-        *output = ScriptBreakpointActionTypeEvaluate;
-        return true;
-    }
-    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Sound)) {
-        *output = ScriptBreakpointActionTypeSound;
-        return true;
-    }
-    if (typeString == Inspector::TypeBuilder::getJSEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Probe)) {
-        *output = ScriptBreakpointActionTypeProbe;
-        return true;
-    }
-
-    return false;
-}
-
-bool InspectorDebuggerAgent::breakpointActionsFromProtocol(ErrorString* errorString, RefPtr&lt;InspectorArray&gt;&amp; actions, Vector&lt;ScriptBreakpointAction&gt;* result)
-{
-    if (!actions)
-        return true;
-
-    unsigned actionsLength = actions-&gt;length();
-    if (!actionsLength)
-        return true;
-
-    result-&gt;reserveCapacity(actionsLength);
-    for (unsigned i = 0; i &lt; actionsLength; ++i) {
-        RefPtr&lt;InspectorValue&gt; value = actions-&gt;get(i);
-        RefPtr&lt;InspectorObject&gt; object;
-        if (!value-&gt;asObject(&amp;object)) {
-            *errorString = &quot;BreakpointAction of incorrect type, expected object&quot;;
-            return false;
-        }
-
-        String typeString;
-        if (!object-&gt;getString(&quot;type&quot;, &amp;typeString)) {
-            *errorString = &quot;BreakpointAction had type missing&quot;;
-            return false;
-        }
-
-        ScriptBreakpointActionType type;
-        if (!breakpointActionTypeForString(typeString, &amp;type)) {
-            *errorString = &quot;BreakpointAction had unknown type&quot;;
-            return false;
-        }
-
-        String data;
-        object-&gt;getString(&quot;data&quot;, &amp;data);
-
-        result-&gt;append(ScriptBreakpointAction(type, m_nextBreakpointActionIdentifier++, data));
-    }
-
-    return true;
-}
-
-void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const RefPtr&lt;InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::Location&gt;&gt;&amp; locations, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers)
-{
-    locations = Array&lt;Inspector::TypeBuilder::Debugger::Location&gt;::create();
-    if (!optionalURL == !optionalURLRegex) {
-        *errorString = &quot;Either url or urlRegex must be specified.&quot;;
-        return;
-    }
-
-    String url = optionalURL ? *optionalURL : *optionalURLRegex;
-    int columnNumber = optionalColumnNumber ? *optionalColumnNumber : 0;
-    bool isRegex = optionalURLRegex;
-
-    String breakpointIdentifier = (isRegex ? &quot;/&quot; + url + &quot;/&quot; : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
-    if (m_javaScriptBreakpoints.contains(breakpointIdentifier)) {
-        *errorString = &quot;Breakpoint at specified location already exists.&quot;;
-        return;
-    }
-
-    String condition = emptyString();
-    bool autoContinue = false;
-    RefPtr&lt;InspectorArray&gt; actions;
-    if (options) {
-        (*options)-&gt;getString(&quot;condition&quot;, &amp;condition);
-        (*options)-&gt;getBoolean(&quot;autoContinue&quot;, &amp;autoContinue);
-        actions = (*options)-&gt;getArray(&quot;actions&quot;);
-    }
-
-    Vector&lt;ScriptBreakpointAction&gt; breakpointActions;
-    if (!breakpointActionsFromProtocol(errorString, actions, &amp;breakpointActions))
-        return;
-
-    breakpointActionIdentifiers = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;::create();
-    for (ScriptBreakpointAction&amp; action : breakpointActions)
-        breakpointActionIdentifiers-&gt;addItem(action.identifier);
-
-    m_javaScriptBreakpoints.set(breakpointIdentifier, buildObjectForBreakpointCookie(url, lineNumber, columnNumber, condition, actions, isRegex, autoContinue));
-
-    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, breakpointActions, autoContinue);
-    for (ScriptsMap::iterator it = m_scripts.begin(); it != m_scripts.end(); ++it) {
-        String scriptURL = !it-&gt;value.sourceURL.isEmpty() ? it-&gt;value.sourceURL : it-&gt;value.url;
-        if (!matches(scriptURL, url, isRegex))
-            continue;
-
-        RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; location = resolveBreakpoint(breakpointIdentifier, it-&gt;key, breakpoint);
-        if (location)
-            locations-&gt;addItem(location);
-    }
-    *outBreakpointIdentifier = breakpointIdentifier;
-}
-
-static bool parseLocation(ErrorString* errorString, InspectorObject* location, JSC::SourceID* sourceID, unsigned* lineNumber, unsigned* columnNumber)
-{
-    String scriptIDStr;
-    if (!location-&gt;getString(&quot;scriptId&quot;, &amp;scriptIDStr) || !location-&gt;getNumber(&quot;lineNumber&quot;, lineNumber)) {
-        // FIXME: replace with input validation.
-        *sourceID = JSC::noSourceID;
-        *errorString = &quot;scriptId and lineNumber are required.&quot;;
-        return false;
-    }
-    *sourceID = scriptIDStr.toIntPtr();
-    *columnNumber = 0;
-    location-&gt;getNumber(&quot;columnNumber&quot;, columnNumber);
-    return true;
-}
-
-void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr&lt;InspectorObject&gt;&amp; location, const RefPtr&lt;InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt;&amp; actualLocation, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers)
-{
-    JSC::SourceID sourceID;
-    unsigned lineNumber;
-    unsigned columnNumber;
-
-    if (!parseLocation(errorString, location.get(), &amp;sourceID, &amp;lineNumber, &amp;columnNumber))
-        return;
-
-    String condition = emptyString();
-    bool autoContinue = false;
-    RefPtr&lt;InspectorArray&gt; actions;
-    if (options) {
-        (*options)-&gt;getString(&quot;condition&quot;, &amp;condition);
-        (*options)-&gt;getBoolean(&quot;autoContinue&quot;, &amp;autoContinue);
-        actions = (*options)-&gt;getArray(&quot;actions&quot;);
-    }
-
-    Vector&lt;ScriptBreakpointAction&gt; breakpointActions;
-    if (!breakpointActionsFromProtocol(errorString, actions, &amp;breakpointActions))
-        return;
-    
-    breakpointActionIdentifiers = Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;::create();
-    for (ScriptBreakpointAction&amp; action : breakpointActions)
-        breakpointActionIdentifiers-&gt;addItem(action.identifier);
-
-    String breakpointIdentifier = String::number(sourceID) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
-    if (m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier) != m_breakpointIdentifierToDebugServerBreakpointIDs.end()) {
-        *errorString = &quot;Breakpoint at specified location already exists.&quot;;
-        return;
-    }
-
-    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, breakpointActions, autoContinue);
-    actualLocation = resolveBreakpoint(breakpointIdentifier, sourceID, breakpoint);
-    if (actualLocation)
-        *outBreakpointIdentifier = breakpointIdentifier;
-    else
-        *errorString = &quot;Could not resolve breakpoint&quot;;
-}
-
-void InspectorDebuggerAgent::removeBreakpoint(ErrorString*, const String&amp; breakpointIdentifier)
-{
-    m_javaScriptBreakpoints.remove(breakpointIdentifier);
-
-    Vector&lt;JSC::BreakpointID&gt; breakpointIDs = m_breakpointIdentifierToDebugServerBreakpointIDs.take(breakpointIdentifier);
-    for (auto breakpointID : breakpointIDs) {
-        const Vector&lt;ScriptBreakpointAction&gt;&amp; breakpointActions = scriptDebugServer().getActionsForBreakpoint(breakpointID);
-        for (auto&amp; action : breakpointActions)
-            m_injectedScriptManager-&gt;releaseObjectGroup(objectGroupForBreakpointAction(action.identifier));
-
-        scriptDebugServer().removeBreakpoint(breakpointID);
-    }
-}
-
-void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, const RefPtr&lt;InspectorObject&gt;&amp; location)
-{
-    if (m_continueToLocationBreakpointID != JSC::noBreakpointID) {
-        scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointID);
-        m_continueToLocationBreakpointID = JSC::noBreakpointID;
-    }
-
-    JSC::SourceID sourceID;
-    unsigned lineNumber;
-    unsigned columnNumber;
-
-    if (!parseLocation(errorString, location.get(), &amp;sourceID, &amp;lineNumber, &amp;columnNumber))
-        return;
-
-    ScriptBreakpoint breakpoint(lineNumber, columnNumber, &quot;&quot;, false);
-    m_continueToLocationBreakpointID = scriptDebugServer().setBreakpoint(sourceID, breakpoint, &amp;lineNumber, &amp;columnNumber);
-    resume(errorString);
-}
-
-PassRefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; InspectorDebuggerAgent::resolveBreakpoint(const String&amp; breakpointIdentifier, JSC::SourceID sourceID, const ScriptBreakpoint&amp; breakpoint)
-{
-    ScriptsMap::iterator scriptIterator = m_scripts.find(sourceID);
-    if (scriptIterator == m_scripts.end())
-        return nullptr;
-    Script&amp; script = scriptIterator-&gt;value;
-    if (breakpoint.lineNumber &lt; script.startLine || script.endLine &lt; breakpoint.lineNumber)
-        return nullptr;
-
-    unsigned actualLineNumber;
-    unsigned actualColumnNumber;
-    JSC::BreakpointID debugServerBreakpointID = scriptDebugServer().setBreakpoint(sourceID, breakpoint, &amp;actualLineNumber, &amp;actualColumnNumber);
-    if (debugServerBreakpointID == JSC::noBreakpointID)
-        return nullptr;
-
-    BreakpointIdentifierToDebugServerBreakpointIDsMap::iterator debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.find(breakpointIdentifier);
-    if (debugServerBreakpointIDsIterator == m_breakpointIdentifierToDebugServerBreakpointIDs.end())
-        debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.set(breakpointIdentifier, Vector&lt;JSC::BreakpointID&gt;()).iterator;
-    debugServerBreakpointIDsIterator-&gt;value.append(debugServerBreakpointID);
-
-    RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; location = Inspector::TypeBuilder::Debugger::Location::create()
-        .setScriptId(String::number(sourceID))
-        .setLineNumber(actualLineNumber);
-    location-&gt;setColumnNumber(actualColumnNumber);
-    return location;
-}
-
-void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String&amp; scriptIDStr, const String&amp; query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr&lt;Array&lt;Inspector::TypeBuilder::GenericTypes::SearchMatch&gt;&gt;&amp; results)
-{
-    bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
-    bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
-
-    JSC::SourceID sourceID = scriptIDStr.toIntPtr();
-    ScriptsMap::iterator it = m_scripts.find(sourceID);
-    if (it != m_scripts.end())
-        results = ContentSearchUtilities::searchInTextByLines(it-&gt;value.source, query, caseSensitive, isRegex);
-    else
-        *error = &quot;No script for id: &quot; + scriptIDStr;
-}
-
-void InspectorDebuggerAgent::getScriptSource(ErrorString* error, const String&amp; scriptIDStr, String* scriptSource)
-{
-    JSC::SourceID sourceID = scriptIDStr.toIntPtr();
-    ScriptsMap::iterator it = m_scripts.find(sourceID);
-    if (it != m_scripts.end())
-        *scriptSource = it-&gt;value.source;
-    else
-        *error = &quot;No script for id: &quot; + scriptIDStr;
-}
-
-void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String&amp; functionId, RefPtr&lt;Inspector::TypeBuilder::Debugger::FunctionDetails&gt;&amp; details)
-{
-    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptForObjectId(functionId);
-    if (injectedScript.hasNoValue()) {
-        *errorString = &quot;Function object id is obsolete&quot;;
-        return;
-    }
-    injectedScript.getFunctionDetails(errorString, functionId, &amp;details);
-}
-
-void InspectorDebuggerAgent::schedulePauseOnNextStatement(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;InspectorObject&gt; data)
-{
-    if (m_javaScriptPauseScheduled)
-        return;
-    m_breakReason = breakReason;
-    m_breakAuxData = data;
-    scriptDebugServer().setPauseOnNextStatement(true);
-}
-
-void InspectorDebuggerAgent::cancelPauseOnNextStatement()
-{
-    if (m_javaScriptPauseScheduled)
-        return;
-    clearBreakDetails();
-    scriptDebugServer().setPauseOnNextStatement(false);
-}
-
-void InspectorDebuggerAgent::pause(ErrorString*)
-{
-    if (m_javaScriptPauseScheduled)
-        return;
-    clearBreakDetails();
-    scriptDebugServer().setPauseOnNextStatement(true);
-    m_javaScriptPauseScheduled = true;
-}
-
-void InspectorDebuggerAgent::resume(ErrorString* errorString)
-{
-    if (!assertPaused(errorString))
-        return;
-    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
-    scriptDebugServer().continueProgram();
-}
-
-void InspectorDebuggerAgent::stepOver(ErrorString* errorString)
-{
-    if (!assertPaused(errorString))
-        return;
-    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
-    scriptDebugServer().stepOverStatement();
-}
-
-void InspectorDebuggerAgent::stepInto(ErrorString* errorString)
-{
-    if (!assertPaused(errorString))
-        return;
-    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
-    scriptDebugServer().stepIntoStatement();
-    m_listener-&gt;stepInto();
-}
-
-void InspectorDebuggerAgent::stepOut(ErrorString* errorString)
-{
-    if (!assertPaused(errorString))
-        return;
-    m_injectedScriptManager-&gt;releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
-    scriptDebugServer().stepOutOfFunction();
-}
-
-void InspectorDebuggerAgent::setPauseOnExceptions(ErrorString* errorString, const String&amp; stringPauseState)
-{
-    ScriptDebugServer::PauseOnExceptionsState pauseState;
-    if (stringPauseState == &quot;none&quot;)
-        pauseState = ScriptDebugServer::DontPauseOnExceptions;
-    else if (stringPauseState == &quot;all&quot;)
-        pauseState = ScriptDebugServer::PauseOnAllExceptions;
-    else if (stringPauseState == &quot;uncaught&quot;)
-        pauseState = ScriptDebugServer::PauseOnUncaughtExceptions;
-    else {
-        *errorString = &quot;Unknown pause on exceptions mode: &quot; + stringPauseState;
-        return;
-    }
-
-    scriptDebugServer().setPauseOnExceptionsState(static_cast&lt;ScriptDebugServer::PauseOnExceptionsState&gt;(pauseState));
-    if (scriptDebugServer().pauseOnExceptionsState() != pauseState)
-        *errorString = &quot;Internal error. Could not change pause on exceptions state&quot;;
-}
-
-void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String&amp; callFrameId, const String&amp; expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr&lt;Inspector::TypeBuilder::Runtime::RemoteObject&gt;&amp; result, Inspector::TypeBuilder::OptOutput&lt;bool&gt;* wasThrown)
-{
-    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptForObjectId(callFrameId);
-    if (injectedScript.hasNoValue()) {
-        *errorString = &quot;Inspected frame has gone&quot;;
-        return;
-    }
-
-    ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = scriptDebugServer().pauseOnExceptionsState();
-    if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
-        if (previousPauseOnExceptionsState != ScriptDebugServer::DontPauseOnExceptions)
-            scriptDebugServer().setPauseOnExceptionsState(ScriptDebugServer::DontPauseOnExceptions);
-        muteConsole();
-    }
-
-    injectedScript.evaluateOnCallFrame(errorString, m_currentCallStack, callFrameId, expression, objectGroup ? *objectGroup : &quot;&quot;, includeCommandLineAPI ? *includeCommandLineAPI : false, returnByValue ? *returnByValue : false, generatePreview ? *generatePreview : false, &amp;result, wasThrown);
-
-    if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
-        unmuteConsole();
-        if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState)
-            scriptDebugServer().setPauseOnExceptionsState(previousPauseOnExceptionsState);
-    }
-}
-
-void InspectorDebuggerAgent::setOverlayMessage(ErrorString*, const String*)
-{
-}
-
-void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String&amp; directiveText)
-{
-    if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontPauseOnExceptions) {
-        RefPtr&lt;InspectorObject&gt; directive = InspectorObject::create();
-        directive-&gt;setString(&quot;directiveText&quot;, directiveText);
-        breakProgram(InspectorDebuggerFrontendDispatcher::Reason::CSPViolation, directive.release());
-    }
-}
-
-PassRefPtr&lt;Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;&gt; InspectorDebuggerAgent::currentCallFrames()
-{
-    if (!m_pausedScriptState)
-        return Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;::create();
-    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptFor(m_pausedScriptState);
-    if (injectedScript.hasNoValue()) {
-        ASSERT_NOT_REACHED();
-        return Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;::create();
-    }
-    return injectedScript.wrapCallFrames(m_currentCallStack);
-}
-
-String InspectorDebuggerAgent::sourceMapURLForScript(const Script&amp; script)
-{
-    DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral(&quot;SourceMap&quot;)));
-    DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeaderDeprecated, (ASCIILiteral(&quot;X-SourceMap&quot;)));
-
-    if (!script.url.isEmpty()) {
-        if (InspectorPageAgent* pageAgent = m_instrumentingAgents-&gt;inspectorPageAgent()) {
-            CachedResource* resource = pageAgent-&gt;cachedResource(pageAgent-&gt;mainFrame(), URL(ParsedURLString, script.url));
-            if (resource) {
-                String sourceMapHeader = resource-&gt;response().httpHeaderField(sourceMapHTTPHeader);
-                if (!sourceMapHeader.isEmpty())
-                    return sourceMapHeader;
-
-                sourceMapHeader = resource-&gt;response().httpHeaderField(sourceMapHTTPHeaderDeprecated);
-                if (!sourceMapHeader.isEmpty())
-                    return sourceMapHeader;
-            }
-        }
-    }
-
-    return ContentSearchUtilities::findScriptSourceMapURL(script.source);
-}
-
-// JavaScriptDebugListener functions
-
-void InspectorDebuggerAgent::didParseSource(JSC::SourceID sourceID, const Script&amp; inScript)
-{
-    Script script = inScript;
-    if (!script.startLine &amp;&amp; !script.startColumn)
-        script.sourceURL = ContentSearchUtilities::findScriptSourceURL(script.source);
-    script.sourceMappingURL = sourceMapURLForScript(script);
-
-    bool hasSourceURL = !script.sourceURL.isEmpty();
-    String scriptURL = hasSourceURL ? script.sourceURL : script.url;
-    bool* hasSourceURLParam = hasSourceURL ? &amp;hasSourceURL : nullptr;
-    String* sourceMapURLParam = script.sourceMappingURL.isNull() ? nullptr : &amp;script.sourceMappingURL;
-    const bool* isContentScript = script.isContentScript ? &amp;script.isContentScript : nullptr;
-    String scriptIDStr = String::number(sourceID);
-    m_frontendDispatcher-&gt;scriptParsed(scriptIDStr, scriptURL, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURLParam, hasSourceURLParam);
-
-    m_scripts.set(sourceID, script);
-
-    if (scriptURL.isEmpty())
-        return;
-
-    for (auto it = m_javaScriptBreakpoints.begin(), end = m_javaScriptBreakpoints.end(); it != end; ++it) {
-        RefPtr&lt;InspectorObject&gt; breakpointObject = it-&gt;value-&gt;asObject();
-        bool isRegex;
-        breakpointObject-&gt;getBoolean(&quot;isRegex&quot;, &amp;isRegex);
-        String url;
-        breakpointObject-&gt;getString(&quot;url&quot;, &amp;url);
-        if (!matches(scriptURL, url, isRegex))
-            continue;
-        ScriptBreakpoint breakpoint;
-        breakpointObject-&gt;getNumber(&quot;lineNumber&quot;, &amp;breakpoint.lineNumber);
-        breakpointObject-&gt;getNumber(&quot;columnNumber&quot;, &amp;breakpoint.columnNumber);
-        breakpointObject-&gt;getString(&quot;condition&quot;, &amp;breakpoint.condition);
-        breakpointObject-&gt;getBoolean(&quot;autoContinue&quot;, &amp;breakpoint.autoContinue);
-        ErrorString errorString;
-        RefPtr&lt;InspectorArray&gt; actions = breakpointObject-&gt;getArray(&quot;actions&quot;);
-        if (!breakpointActionsFromProtocol(&amp;errorString, actions, &amp;breakpoint.actions)) {
-            ASSERT_NOT_REACHED();
-            continue;
-        }
-
-        RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; location = resolveBreakpoint(it-&gt;key, sourceID, breakpoint);
-        if (location)
-            m_frontendDispatcher-&gt;breakpointResolved(it-&gt;key, location);
-    }
-}
-
-void InspectorDebuggerAgent::failedToParseSource(const String&amp; url, const String&amp; data, int firstLine, int errorLine, const String&amp; errorMessage)
-{
-    m_frontendDispatcher-&gt;scriptFailedToParse(url, data, firstLine, errorLine, errorMessage);
-}
-
-void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const Deprecated::ScriptValue&amp; callFrames, const Deprecated::ScriptValue&amp; exception)
-{
-    ASSERT(scriptState &amp;&amp; !m_pausedScriptState);
-    m_pausedScriptState = scriptState;
-    m_currentCallStack = callFrames;
-
-    if (!exception.hasNoValue()) {
-        InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptFor(scriptState);
-        if (!injectedScript.hasNoValue()) {
-            m_breakReason = InspectorDebuggerFrontendDispatcher::Reason::Exception;
-            m_breakAuxData = injectedScript.wrapObject(exception, &quot;backtrace&quot;)-&gt;openAccessors();
-            // m_breakAuxData might be null after this.
-        }
-    }
-
-    m_frontendDispatcher-&gt;paused(currentCallFrames(), m_breakReason, m_breakAuxData);
-    m_javaScriptPauseScheduled = false;
-
-    if (m_continueToLocationBreakpointID != JSC::noBreakpointID) {
-        scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointID);
-        m_continueToLocationBreakpointID = JSC::noBreakpointID;
-    }
-    if (m_listener)
-        m_listener-&gt;didPause();
-}
-
-void InspectorDebuggerAgent::didSampleProbe(JSC::ExecState* scriptState, int probeIdentifier, int hitCount, const Deprecated::ScriptValue&amp; sample)
-{
-    int sampleId = m_nextProbeSampleId++;
-
-    InjectedScript injectedScript = m_injectedScriptManager-&gt;injectedScriptFor(scriptState);
-    RefPtr&lt;TypeBuilder::Runtime::RemoteObject&gt; payload = injectedScript.wrapObject(sample, objectGroupForBreakpointAction(probeIdentifier));
-    RefPtr&lt;TypeBuilder::Debugger::ProbeSample&gt; result = TypeBuilder::Debugger::ProbeSample::create()
-        .setProbeId(probeIdentifier)
-        .setSampleId(sampleId)
-        .setBatchId(hitCount)
-        .setTimestamp(monotonicallyIncreasingTime())
-        .setPayload(payload.release());
-
-    m_frontendDispatcher-&gt;didSampleProbe(result.release());
-}
-
-void InspectorDebuggerAgent::breakpointActionSound()
-{
-    // FIXME: We should send a message to the frontend to make the frontend beep.
-    systemBeep();
-}
-
-void InspectorDebuggerAgent::didContinue()
-{
-    m_pausedScriptState = nullptr;
-    m_currentCallStack = Deprecated::ScriptValue();
-    clearBreakDetails();
-    m_frontendDispatcher-&gt;resumed();
-}
-
-void InspectorDebuggerAgent::breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;InspectorObject&gt; data)
-{
-    m_breakReason = breakReason;
-    m_breakAuxData = data;
-    scriptDebugServer().breakProgram();
-}
-
-void InspectorDebuggerAgent::clearResolvedBreakpointState()
-{
-    ErrorString dummyError;
-    Vector&lt;String&gt; breakpointIdentifiers;
-    copyKeysToVector(m_breakpointIdentifierToDebugServerBreakpointIDs, breakpointIdentifiers);
-    for (const String&amp; identifier : breakpointIdentifiers)
-        removeBreakpoint(&amp;dummyError, identifier);
-
-    scriptDebugServer().continueProgram();
-
-    m_pausedScriptState = nullptr;
-    m_currentCallStack = Deprecated::ScriptValue();
-    m_scripts.clear();
-    m_breakpointIdentifierToDebugServerBreakpointIDs.clear();
-    m_continueToLocationBreakpointID = JSC::noBreakpointID;
-    clearBreakDetails();
-    m_javaScriptPauseScheduled = false;
-    setOverlayMessage(&amp;dummyError, nullptr);
-}
-
-bool InspectorDebuggerAgent::assertPaused(ErrorString* errorString)
-{
-    if (!m_pausedScriptState) {
-        *errorString = &quot;Can only perform operation while paused.&quot;;
-        return false;
-    }
-    return true;
-}
-
-void InspectorDebuggerAgent::clearBreakDetails()
-{
-    m_breakReason = InspectorDebuggerFrontendDispatcher::Reason::Other;
-    m_breakAuxData = nullptr;
-}
-
-void InspectorDebuggerAgent::didClearGlobalObject()
-{
-    if (m_frontendDispatcher)
-        m_frontendDispatcher-&gt;globalObjectCleared();
-
-    clearResolvedBreakpointState();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
</del></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDebuggerAgenth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -1,186 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
- * Copyright (C) 2010-2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorDebuggerAgent_h
-#define InspectorDebuggerAgent_h
-
-#if ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
-
-#include &quot;ConsoleAPITypes.h&quot;
-#include &quot;ConsoleTypes.h&quot;
-#include &quot;InspectorWebAgentBase.h&quot;
-#include &lt;bindings/ScriptValue.h&gt;
-#include &lt;debugger/Debugger.h&gt;
-#include &lt;inspector/InspectorJSBackendDispatchers.h&gt;
-#include &lt;inspector/InspectorJSFrontendDispatchers.h&gt;
-#include &lt;inspector/ScriptBreakpoint.h&gt;
-#include &lt;inspector/ScriptDebugListener.h&gt;
-#include &lt;wtf/Forward.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
-#include &lt;wtf/PassRefPtr.h&gt;
-#include &lt;wtf/Vector.h&gt;
-#include &lt;wtf/text/StringHash.h&gt;
-
-namespace Inspector {
-class InjectedScript;
-class InjectedScriptManager;
-class InspectorArray;
-class InspectorObject;
-class InspectorValue;
-class ScriptDebugServer;
-}
-
-namespace WebCore {
-
-class InstrumentingAgents;
-
-typedef String ErrorString;
-
-class InspectorDebuggerAgent : public InspectorAgentBase, public Inspector::ScriptDebugListener, public Inspector::InspectorDebuggerBackendDispatcherHandler {
-    WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
-public:
-    static const char* backtraceObjectGroup;
-
-    virtual ~InspectorDebuggerAgent();
-
-    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) override;
-    virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override;
-
-    bool isPaused();
-    void addMessageToConsole(MessageSource, MessageType);
-
-    // Part of the protocol.
-    virtual void enable(ErrorString*) override;
-    virtual void disable(ErrorString*) override;
-    virtual void setBreakpointsActive(ErrorString*, bool active) override;
-
-    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const RefPtr&lt;Inspector::InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId*, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::Location&gt;&gt;&amp; locations, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers) override;
-    virtual void setBreakpoint(ErrorString*, const RefPtr&lt;Inspector::InspectorObject&gt;&amp; location, const RefPtr&lt;Inspector::InspectorObject&gt;* options, Inspector::TypeBuilder::Debugger::BreakpointId*, RefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt;&amp; actualLocation, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::BreakpointActionIdentifier&gt;&gt;&amp; breakpointActionIdentifiers) override;
-    virtual void removeBreakpoint(ErrorString*, const String&amp; breakpointIdentifier) override;
-    virtual void continueToLocation(ErrorString*, const RefPtr&lt;Inspector::InspectorObject&gt;&amp; location) override;
-
-    virtual void searchInContent(ErrorString*, const String&amp; scriptID, const String&amp; query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::GenericTypes::SearchMatch&gt;&gt;&amp;) override;
-    virtual void getScriptSource(ErrorString*, const String&amp; scriptID, String* scriptSource) override;
-    virtual void getFunctionDetails(ErrorString*, const String&amp; functionId, RefPtr&lt;Inspector::TypeBuilder::Debugger::FunctionDetails&gt;&amp;) override;
-    virtual void pause(ErrorString*) override;
-    virtual void resume(ErrorString*) override;
-    virtual void stepOver(ErrorString*) override;
-    virtual void stepInto(ErrorString*) override;
-    virtual void stepOut(ErrorString*) override;
-    virtual void setPauseOnExceptions(ErrorString*, const String&amp; pauseState) override;
-    virtual void evaluateOnCallFrame(ErrorString*,
-                             const String&amp; callFrameId,
-                             const String&amp; expression,
-                             const String* objectGroup,
-                             const bool* includeCommandLineAPI,
-                             const bool* doNotPauseOnExceptionsAndMuteConsole,
-                             const bool* returnByValue,
-                             const bool* generatePreview,
-                             RefPtr&lt;Inspector::TypeBuilder::Runtime::RemoteObject&gt;&amp; result,
-                             Inspector::TypeBuilder::OptOutput&lt;bool&gt;* wasThrown) override;
-    virtual void setOverlayMessage(ErrorString*, const String*) override;
-
-    void schedulePauseOnNextStatement(Inspector::InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;Inspector::InspectorObject&gt; data);
-    void cancelPauseOnNextStatement();
-    void breakProgram(Inspector::InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr&lt;Inspector::InspectorObject&gt; data);
-    void scriptExecutionBlockedByCSP(const String&amp; directiveText);
-
-    class Listener {
-    public:
-        virtual ~Listener() { }
-        virtual void debuggerWasEnabled() = 0;
-        virtual void debuggerWasDisabled() = 0;
-        virtual void stepInto() = 0;
-        virtual void didPause() = 0;
-    };
-    void setListener(Listener* listener) { m_listener = listener; }
-
-    virtual Inspector::ScriptDebugServer&amp; scriptDebugServer() = 0;
-
-protected:
-    InspectorDebuggerAgent(InstrumentingAgents*, Inspector::InjectedScriptManager*);
-
-    virtual void startListeningScriptDebugServer() = 0;
-    virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) = 0;
-    virtual void muteConsole() = 0;
-    virtual void unmuteConsole() = 0;
-    Inspector::InjectedScriptManager* injectedScriptManager() const { return m_injectedScriptManager; }
-    virtual Inspector::InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) = 0;
-
-    virtual void enable();
-    virtual void disable(bool isBeingDestroyed);
-    virtual void didPause(JSC::ExecState*, const Deprecated::ScriptValue&amp; callFrames, const Deprecated::ScriptValue&amp; exception) override;
-    virtual void didContinue() override;
-    void didClearGlobalObject();
-
-private:
-    PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::Debugger::CallFrame&gt;&gt; currentCallFrames();
-
-    virtual void didParseSource(JSC::SourceID, const Script&amp;) override final;
-    virtual void failedToParseSource(const String&amp; url, const String&amp; data, int firstLine, int errorLine, const String&amp; errorMessage) override final;
-    virtual void didSampleProbe(JSC::ExecState*, int probeIdentifier, int hitCount, const Deprecated::ScriptValue&amp; sample) override final;
-    virtual void breakpointActionSound() override final;
-
-    PassRefPtr&lt;Inspector::TypeBuilder::Debugger::Location&gt; resolveBreakpoint(const String&amp; breakpointIdentifier, JSC::SourceID, const Inspector::ScriptBreakpoint&amp;);
-    bool assertPaused(ErrorString*);
-    void clearResolvedBreakpointState();
-    void clearBreakDetails();
-
-    bool breakpointActionsFromProtocol(ErrorString*, RefPtr&lt;Inspector::InspectorArray&gt;&amp; actions, Vector&lt;Inspector::ScriptBreakpointAction&gt;* result);
-
-    String sourceMapURLForScript(const Script&amp;);
-
-    typedef HashMap&lt;JSC::SourceID, Script&gt; ScriptsMap;
-    typedef HashMap&lt;String, Vector&lt;JSC::BreakpointID&gt;&gt; BreakpointIdentifierToDebugServerBreakpointIDsMap;
-    typedef HashMap&lt;String, RefPtr&lt;Inspector::InspectorObject&gt;&gt; BreakpointIdentifierToBreakpointMap;
-
-    Inspector::InjectedScriptManager* m_injectedScriptManager;
-    std::unique_ptr&lt;Inspector::InspectorDebuggerFrontendDispatcher&gt; m_frontendDispatcher;
-    RefPtr&lt;Inspector::InspectorDebuggerBackendDispatcher&gt; m_backendDispatcher;
-    JSC::ExecState* m_pausedScriptState;
-    Deprecated::ScriptValue m_currentCallStack;
-    ScriptsMap m_scripts;
-    BreakpointIdentifierToDebugServerBreakpointIDsMap m_breakpointIdentifierToDebugServerBreakpointIDs;
-    BreakpointIdentifierToBreakpointMap m_javaScriptBreakpoints;
-    JSC::BreakpointID m_continueToLocationBreakpointID;
-    Inspector::InspectorDebuggerFrontendDispatcher::Reason::Enum m_breakReason;
-    RefPtr&lt;Inspector::InspectorObject&gt; m_breakAuxData;
-    bool m_enabled;
-    bool m_javaScriptPauseScheduled;
-    Listener* m_listener;
-    int m_nextProbeSampleId;
-    int m_nextBreakpointActionIdentifier;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
-
-#endif // !defined(InspectorDebuggerAgent_h)
</del></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -29,11 +29,10 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><ins>+#include &quot;InspectorInstrumentation.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><del>-#include &quot;InspectorInstrumentation.h&quot;
-
</del><span class="cx"> #include &quot;CSSRule.h&quot;
</span><span class="cx"> #include &quot;CSSStyleRule.h&quot;
</span><span class="cx"> #include &quot;ConsoleAPITypes.h&quot;
</span><span class="lines">@@ -52,7 +51,6 @@
</span><span class="cx"> #include &quot;InspectorDOMDebuggerAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDOMStorageAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorDatabaseAgent.h&quot;
</span><del>-#include &quot;InspectorDebuggerAgent.h&quot;
</del><span class="cx"> #include &quot;InspectorHeapProfilerAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorLayerTreeAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorPageAgent.h&quot;
</span><span class="lines">@@ -76,6 +74,7 @@
</span><span class="cx"> #include &quot;WorkerRuntimeAgent.h&quot;
</span><span class="cx"> #include &quot;WorkerThread.h&quot;
</span><span class="cx"> #include &quot;XMLHttpRequest.h&quot;
</span><ins>+#include &lt;inspector/agents/InspectorDebuggerAgent.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -884,14 +883,23 @@
</span><span class="cx">         timelineAgent-&gt;didWriteHTML(endLine);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
+static bool isConsoleAssertMessage(MessageSource source, MessageType type)
+{
+    return source == ConsoleAPIMessageSource &amp;&amp; type == AssertMessageType;
+}
+
</ins><span class="cx"> // FIXME: Drop this once we no longer generate stacks outside of Inspector.
</span><span class="cx"> void InspectorInstrumentation::addMessageToConsoleImpl(InstrumentingAgents* instrumentingAgents, MessageSource source, MessageType type, MessageLevel level, const String&amp; message, PassRefPtr&lt;ScriptCallStack&gt; callStack, unsigned long requestIdentifier)
</span><span class="cx"> {
</span><span class="cx">     if (InspectorConsoleAgent* consoleAgent = instrumentingAgents-&gt;inspectorConsoleAgent())
</span><span class="cx">         consoleAgent-&gt;addMessageToConsole(source, type, level, message, callStack, requestIdentifier);
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent())
-        debuggerAgent-&gt;addMessageToConsole(source, type);
</del><ins>+    // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent()) {
+        if (isConsoleAssertMessage(source, type))
+            debuggerAgent-&gt;handleConsoleAssert();
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -900,8 +908,11 @@
</span><span class="cx">     if (InspectorConsoleAgent* consoleAgent = instrumentingAgents-&gt;inspectorConsoleAgent())
</span><span class="cx">         consoleAgent-&gt;addMessageToConsole(source, type, level, message, state, arguments, requestIdentifier);
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent())
-        debuggerAgent-&gt;addMessageToConsole(source, type);
</del><ins>+    // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
+    if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents-&gt;inspectorDebuggerAgent()) {
+        if (isConsoleAssertMessage(source, type))
+            debuggerAgent-&gt;handleConsoleAssert();
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInstrumentingAgentsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InstrumentingAgents.h (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InstrumentingAgents.h        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/InstrumentingAgents.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace Inspector {
</span><span class="cx"> class InspectorAgent;
</span><ins>+class InspectorDebuggerAgent;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -51,7 +52,6 @@
</span><span class="cx"> class InspectorDOMDebuggerAgent;
</span><span class="cx"> class InspectorDOMStorageAgent;
</span><span class="cx"> class InspectorDatabaseAgent;
</span><del>-class InspectorDebuggerAgent;
</del><span class="cx"> class InspectorHeapProfilerAgent;
</span><span class="cx"> class InspectorLayerTreeAgent;
</span><span class="cx"> class InspectorPageAgent;
</span><span class="lines">@@ -117,8 +117,8 @@
</span><span class="cx">     void setInspectorApplicationCacheAgent(InspectorApplicationCacheAgent* agent) { m_inspectorApplicationCacheAgent = agent; }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    InspectorDebuggerAgent* inspectorDebuggerAgent() const { return m_inspectorDebuggerAgent; }
-    void setInspectorDebuggerAgent(InspectorDebuggerAgent* agent) { m_inspectorDebuggerAgent = agent; }
</del><ins>+    Inspector::InspectorDebuggerAgent* inspectorDebuggerAgent() const { return m_inspectorDebuggerAgent; }
+    void setInspectorDebuggerAgent(Inspector::InspectorDebuggerAgent* agent) { m_inspectorDebuggerAgent = agent; }
</ins><span class="cx"> 
</span><span class="cx">     PageDebuggerAgent* pageDebuggerAgent() const { return m_pageDebuggerAgent; }
</span><span class="cx">     void setPageDebuggerAgent(PageDebuggerAgent* agent) { m_pageDebuggerAgent = agent; }
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     InspectorApplicationCacheAgent* m_inspectorApplicationCacheAgent;
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    InspectorDebuggerAgent* m_inspectorDebuggerAgent;
</del><ins>+    Inspector::InspectorDebuggerAgent* m_inspectorDebuggerAgent;
</ins><span class="cx">     PageDebuggerAgent* m_pageDebuggerAgent;
</span><span class="cx">     InspectorDOMDebuggerAgent* m_inspectorDOMDebuggerAgent;
</span><span class="cx">     InspectorProfilerAgent* m_inspectorProfilerAgent;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><ins>+#include &quot;PageDebuggerAgent.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><del>-#include &quot;PageDebuggerAgent.h&quot;
-
</del><ins>+#include &quot;CachedResource.h&quot;
</ins><span class="cx"> #include &quot;InspectorOverlay.h&quot;
</span><span class="cx"> #include &quot;InspectorPageAgent.h&quot;
</span><span class="cx"> #include &quot;InstrumentingAgents.h&quot;
</span><span class="lines">@@ -48,29 +48,46 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PageDebuggerAgent::PageDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
-    : InspectorDebuggerAgent(instrumentingAgents, injectedScriptManager)
</del><ins>+PageDebuggerAgent::PageDebuggerAgent(InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorOverlay* overlay)
+    : WebDebuggerAgent(injectedScriptManager, instrumentingAgents)
</ins><span class="cx">     , m_pageAgent(pageAgent)
</span><span class="cx">     , m_overlay(overlay)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PageDebuggerAgent::~PageDebuggerAgent()
-{
-}
-
</del><span class="cx"> void PageDebuggerAgent::enable()
</span><span class="cx"> {
</span><del>-    InspectorDebuggerAgent::enable();
</del><ins>+    WebDebuggerAgent::enable();
</ins><span class="cx">     m_instrumentingAgents-&gt;setPageDebuggerAgent(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageDebuggerAgent::disable(bool isBeingDestroyed)
</span><span class="cx"> {
</span><del>-    InspectorDebuggerAgent::disable(isBeingDestroyed);
</del><ins>+    WebDebuggerAgent::disable(isBeingDestroyed);
</ins><span class="cx">     m_instrumentingAgents-&gt;setPageDebuggerAgent(nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String PageDebuggerAgent::sourceMapURLForScript(const Script&amp; script)
+{
+    DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeader, (ASCIILiteral(&quot;SourceMap&quot;)));
+    DEFINE_STATIC_LOCAL(String, sourceMapHTTPHeaderDeprecated, (ASCIILiteral(&quot;X-SourceMap&quot;)));
+
+    if (!script.url.isEmpty()) {
+        CachedResource* resource = m_pageAgent-&gt;cachedResource(m_pageAgent-&gt;mainFrame(), URL(ParsedURLString, script.url));
+        if (resource) {
+            String sourceMapHeader = resource-&gt;response().httpHeaderField(sourceMapHTTPHeader);
+            if (!sourceMapHeader.isEmpty())
+                return sourceMapHeader;
+
+            sourceMapHeader = resource-&gt;response().httpHeaderField(sourceMapHTTPHeaderDeprecated);
+            if (!sourceMapHeader.isEmpty())
+                return sourceMapHeader;
+        }
+    }
+
+    return InspectorDebuggerAgent::sourceMapURLForScript(script);
+}
+
</ins><span class="cx"> void PageDebuggerAgent::startListeningScriptDebugServer()
</span><span class="cx"> {
</span><span class="cx">     scriptDebugServer().addListener(this, m_pageAgent-&gt;page());
</span><span class="lines">@@ -107,9 +124,11 @@
</span><span class="cx">         JSC::ExecState* scriptState = mainWorldExecState(m_pageAgent-&gt;mainFrame());
</span><span class="cx">         return injectedScriptManager()-&gt;injectedScriptFor(scriptState);
</span><span class="cx">     }
</span><ins>+
</ins><span class="cx">     InjectedScript injectedScript = injectedScriptManager()-&gt;injectedScriptForId(*executionContextId);
</span><span class="cx">     if (injectedScript.hasNoValue())
</span><del>-        *errorString = &quot;Execution context with given id not found.&quot;;
</del><ins>+        *errorString = ASCIILiteral(&quot;Execution context with given id not found.&quot;);
+
</ins><span class="cx">     return injectedScript;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorPageDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.h (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/PageDebuggerAgent.h        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -33,22 +33,23 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
</span><span class="cx"> 
</span><del>-#include &quot;InspectorDebuggerAgent.h&quot;
</del><span class="cx"> #include &quot;PageScriptDebugServer.h&quot;
</span><ins>+#include &quot;WebDebuggerAgent.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class InspectorOverlay;
</span><span class="cx"> class InspectorPageAgent;
</span><ins>+class InstrumentingAgents;
</ins><span class="cx"> class Page;
</span><span class="cx"> class PageScriptDebugServer;
</span><span class="cx"> 
</span><del>-class PageDebuggerAgent final : public InspectorDebuggerAgent {
</del><ins>+class PageDebuggerAgent final : public WebDebuggerAgent {
</ins><span class="cx">     WTF_MAKE_NONCOPYABLE(PageDebuggerAgent);
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    PageDebuggerAgent(InstrumentingAgents*, InspectorPageAgent*, Inspector::InjectedScriptManager*, InspectorOverlay*);
-    virtual ~PageDebuggerAgent();
</del><ins>+    PageDebuggerAgent(Inspector::InjectedScriptManager*, InstrumentingAgents*, InspectorPageAgent*, InspectorOverlay*);
+    virtual ~PageDebuggerAgent() { }
</ins><span class="cx"> 
</span><span class="cx">     void didClearMainFrameWindowObject();
</span><span class="cx"> 
</span><span class="lines">@@ -56,6 +57,8 @@
</span><span class="cx">     virtual void enable() override;
</span><span class="cx">     virtual void disable(bool isBeingDestroyed) override;
</span><span class="cx"> 
</span><ins>+    virtual String sourceMapURLForScript(const Script&amp;) override;
+
</ins><span class="cx"> private:
</span><span class="cx">     virtual void startListeningScriptDebugServer() override;
</span><span class="cx">     virtual void stopListeningScriptDebugServer(bool isBeingDestroyed) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWebDebuggerAgentcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/inspector/WebDebuggerAgent.cpp (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WebDebuggerAgent.cpp                                (rev 0)
+++ trunk/Source/WebCore/inspector/WebDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebDebuggerAgent.h&quot;
+
+#if ENABLE(INSPECTOR)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include &quot;InstrumentingAgents.h&quot;
+
+using namespace Inspector;
+
+namespace WebCore {
+
+WebDebuggerAgent::WebDebuggerAgent(InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents)
+    : InspectorDebuggerAgent(injectedScriptManager)
+    , m_instrumentingAgents(instrumentingAgents)
+{
+}
+
+void WebDebuggerAgent::enable()
+{
+    InspectorDebuggerAgent::enable();
+    m_instrumentingAgents-&gt;setInspectorDebuggerAgent(this);
+}
+
+void WebDebuggerAgent::disable(bool isBeingDestroyed)
+{
+    InspectorDebuggerAgent::disable(isBeingDestroyed);
+    m_instrumentingAgents-&gt;setInspectorDebuggerAgent(nullptr);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+#endif // ENABLE(INSPECTOR)
</ins></span></pre></div>
<a id="trunkSourceWebCoreinspectorWebDebuggerAgenth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/inspector/WebDebuggerAgent.h (0 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WebDebuggerAgent.h                                (rev 0)
+++ trunk/Source/WebCore/inspector/WebDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebDebuggerAgent_h
+#define WebDebuggerAgent_h
+
+#if ENABLE(INSPECTOR)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+
+#include &lt;inspector/agents/InspectorDebuggerAgent.h&gt;
+
+namespace WebCore {
+
+class InstrumentingAgents;
+typedef String ErrorString;
+
+class WebDebuggerAgent : public Inspector::InspectorDebuggerAgent {
+    WTF_MAKE_NONCOPYABLE(WebDebuggerAgent);
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    WebDebuggerAgent(Inspector::InjectedScriptManager*, InstrumentingAgents*);
+    virtual ~WebDebuggerAgent() { }
+
+protected:
+    virtual void enable() override;
+    virtual void disable(bool isBeingDestroyed) override;
+
+    InstrumentingAgents* m_instrumentingAgents;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(JAVASCRIPT_DEBUGGER)
+#endif // ENABLE(INSPECTOR)
+
+#endif // !defined(WebDebuggerAgent_h)
</ins></span></pre></div>
<a id="trunkSourceWebCoreinspectorWorkerDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WorkerDebuggerAgent.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WorkerDebuggerAgent.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/WorkerDebuggerAgent.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -92,8 +92,8 @@
</span><span class="cx"> 
</span><span class="cx"> const char* WorkerDebuggerAgent::debuggerTaskMode = &quot;debugger&quot;;
</span><span class="cx"> 
</span><del>-WorkerDebuggerAgent::WorkerDebuggerAgent(InstrumentingAgents* instrumentingAgents, WorkerGlobalScope* inspectedWorkerGlobalScope, InjectedScriptManager* injectedScriptManager)
-    : InspectorDebuggerAgent(instrumentingAgents, injectedScriptManager)
</del><ins>+WorkerDebuggerAgent::WorkerDebuggerAgent(InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents, WorkerGlobalScope* inspectedWorkerGlobalScope)
+    : WebDebuggerAgent(injectedScriptManager, instrumentingAgents)
</ins><span class="cx">     , m_scriptDebugServer(inspectedWorkerGlobalScope, WorkerDebuggerAgent::debuggerTaskMode)
</span><span class="cx">     , m_inspectedWorkerGlobalScope(inspectedWorkerGlobalScope)
</span><span class="cx"> {
</span><span class="lines">@@ -140,9 +140,10 @@
</span><span class="cx"> InjectedScript WorkerDebuggerAgent::injectedScriptForEval(ErrorString* error, const int* executionContextId)
</span><span class="cx"> {
</span><span class="cx">     if (executionContextId) {
</span><del>-        *error = &quot;Execution context id is not supported for workers as there is only one execution context.&quot;;
</del><ins>+        *error = ASCIILiteral(&quot;Execution context id is not supported for workers as there is only one execution context.&quot;);
</ins><span class="cx">         return InjectedScript();
</span><span class="cx">     }
</span><ins>+
</ins><span class="cx">     JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_inspectedWorkerGlobalScope);
</span><span class="cx">     return injectedScriptManager()-&gt;injectedScriptFor(scriptState);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWorkerDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WorkerDebuggerAgent.h (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WorkerDebuggerAgent.h        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/WorkerDebuggerAgent.h        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -32,7 +32,8 @@
</span><span class="cx"> #define WorkerDebuggerAgent_h
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE(INSPECTOR)
</span><del>-#include &quot;InspectorDebuggerAgent.h&quot;
</del><ins>+
+#include &quot;WebDebuggerAgent.h&quot;
</ins><span class="cx"> #include &quot;WorkerScriptDebugServer.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -40,11 +41,11 @@
</span><span class="cx"> class WorkerGlobalScope;
</span><span class="cx"> class WorkerThread;
</span><span class="cx"> 
</span><del>-class WorkerDebuggerAgent final : public InspectorDebuggerAgent {
</del><ins>+class WorkerDebuggerAgent final : public WebDebuggerAgent {
</ins><span class="cx">     WTF_MAKE_NONCOPYABLE(WorkerDebuggerAgent);
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    WorkerDebuggerAgent(InstrumentingAgents*, WorkerGlobalScope*, Inspector::InjectedScriptManager*);
</del><ins>+    WorkerDebuggerAgent(Inspector::InjectedScriptManager*, InstrumentingAgents*, WorkerGlobalScope*);
</ins><span class="cx">     virtual ~WorkerDebuggerAgent();
</span><span class="cx"> 
</span><span class="cx">     static const char* debuggerTaskMode;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWorkerInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.cpp (162798 => 162799)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WorkerInspectorController.cpp        2014-01-26 07:19:08 UTC (rev 162798)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.cpp        2014-01-26 08:39:12 UTC (rev 162799)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto consoleAgent = std::make_unique&lt;WorkerConsoleAgent&gt;(m_instrumentingAgents.get(), m_injectedScriptManager.get());
</span><span class="cx"> #if ENABLE(JAVASCRIPT_DEBUGGER)
</span><del>-    auto debuggerAgent = std::make_unique&lt;WorkerDebuggerAgent&gt;(m_instrumentingAgents.get(), &amp;workerGlobalScope, m_injectedScriptManager.get());
</del><ins>+    auto debuggerAgent = std::make_unique&lt;WorkerDebuggerAgent&gt;(m_injectedScriptManager.get(), m_instrumentingAgents.get(), &amp;workerGlobalScope);
</ins><span class="cx">     m_runtimeAgent-&gt;setScriptDebugServer(&amp;debuggerAgent-&gt;scriptDebugServer());
</span><span class="cx">     m_agents.append(std::move(debuggerAgent));
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>