<!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>[212424] trunk/Source</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/212424">212424</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2017-02-15 23:40:16 -0800 (Wed, 15 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/212394">r212394</a>.

Fixed iOS WebInspector

Reverted changeset:

&quot;Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/212169">r212169</a>.&quot;
https://bugs.webkit.org/show_bug.cgi?id=166681
http://trac.webkit.org/changeset/212394</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPIJSRemoteInspectorcpp">trunk/Source/JavaScriptCore/API/JSRemoteInspector.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorePlatformMaccmake">trunk/Source/JavaScriptCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteConnectionToTargeth">trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteControllableTargeth">trunk/Source/JavaScriptCore/inspector/remote/RemoteControllableTarget.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectionTargeth">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorh">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremotecocoaRemoteConnectionToTargetCocoamm">trunk/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/JavaScriptCore/inspector/remote/cocoa/</li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteConnectionToTargetmm">trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.mm</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectormm">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorXPCConnectionh">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorXPCConnectionmm">trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSRemoteInspectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSRemoteInspector.cpp (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSRemoteInspector.cpp        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/API/JSRemoteInspector.cpp        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -50,9 +50,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JSRemoteInspectorSetParentProcessInformation(pid_t pid, const UInt8* auditData, size_t auditLength)
</del><ins>+void JSRemoteInspectorSetParentProcessInformation(pid_t pid, const uint8_t* auditData, size_t auditLength)
</ins><span class="cx"> {
</span><del>-#if ENABLE(REMOTE_INSPECTOR)
</del><ins>+#if ENABLE(REMOTE_INSPECTOR) &amp;&amp; PLATFORM(COCOA)
</ins><span class="cx">     RetainPtr&lt;CFDataRef&gt; auditDataRef = adoptCF(CFDataCreate(kCFAllocatorDefault, auditData, auditLength));
</span><span class="cx">     RemoteInspector::singleton().setParentProcessInformation(pid, auditDataRef);
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-02-15  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Unreviewed, rolling out r212394.
+
+        Fixed iOS WebInspector
+
+        Reverted changeset:
+
+        &quot;Unreviewed, rolling out r212169.&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=166681
+        http://trac.webkit.org/changeset/212394
+
</ins><span class="cx"> 2017-02-15  Guillaume Emont  &lt;guijemont@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         MIPS: add missing implementations of load8SignedExtendTo32()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1603,6 +1603,11 @@
</span><span class="cx">                 9928FF3B18AC4AEC00B8CF12 /* JSReplayInputs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9928FF3918AC4AEC00B8CF12 /* JSReplayInputs.cpp */; };
</span><span class="cx">                 9928FF3C18AC4AEC00B8CF12 /* JSReplayInputs.h in Headers */ = {isa = PBXBuildFile; fileRef = 9928FF3A18AC4AEC00B8CF12 /* JSReplayInputs.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 992ABCF91BEA9BD2006403A0 /* RemoteAutomationTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 992ABCF51BEA94CA006403A0 /* RemoteAutomationTarget.cpp */; };
</span><ins>+                992F56B41E4E84A40035953B /* RemoteConnectionToTargetCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 992F56B31E4E847D0035953B /* RemoteConnectionToTargetCocoa.mm */; };
+                992F56B51E4E84A80035953B /* RemoteInspectorCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 992F56B01E4E84790035953B /* RemoteInspectorCocoa.mm */; };
+                992F56B61E4E84AB0035953B /* RemoteInspectorXPCConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 992F56B21E4E84790035953B /* RemoteInspectorXPCConnection.mm */; };
+                992F56B71E4E84B20035953B /* RemoteInspectorXPCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 992F56B11E4E84790035953B /* RemoteInspectorXPCConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                995566861E4E8B0F00AAE13C /* RemoteInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 995566851E4E8B0700AAE13C /* RemoteInspector.cpp */; };
</ins><span class="cx">                 9959E92B1BD17FA4001AA413 /* cssmin.py in Headers */ = {isa = PBXBuildFile; fileRef = 9959E9271BD17FA0001AA413 /* cssmin.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9959E92D1BD17FA4001AA413 /* jsmin.py in Headers */ = {isa = PBXBuildFile; fileRef = 9959E9291BD17FA0001AA413 /* jsmin.py */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9959E92E1BD17FA4001AA413 /* xxd.pl in Headers */ = {isa = PBXBuildFile; fileRef = 9959E92A1BD17FA0001AA413 /* xxd.pl */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1779,12 +1784,8 @@
</span><span class="cx">                 A5AB49DD1BEC8086007020FB /* PerGlobalObjectWrapperWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = A5AB49DB1BEC8079007020FB /* PerGlobalObjectWrapperWorld.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A5B6A74D18C6DBA600F11E91 /* ConsoleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5B6A74C18C6DBA600F11E91 /* ConsoleClient.cpp */; };
</span><span class="cx">                 A5BA15E8182340B300A82E69 /* RemoteInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E1182340B300A82E69 /* RemoteInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                A5BA15E9182340B300A82E69 /* RemoteInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E2182340B300A82E69 /* RemoteInspector.mm */; };
</del><span class="cx">                 A5BA15EA182340B400A82E69 /* RemoteInspectorConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A5BA15EB182340B400A82E69 /* RemoteConnectionToTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E4182340B300A82E69 /* RemoteConnectionToTarget.h */; };
</span><del>-                A5BA15EC182340B400A82E69 /* RemoteConnectionToTarget.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E5182340B300A82E69 /* RemoteConnectionToTarget.mm */; };
-                A5BA15ED182340B400A82E69 /* RemoteInspectorXPCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */; };
</del><span class="cx">                 A5BA15F0182345AF00A82E69 /* RemoteInspectionTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15EF182345AF00A82E69 /* RemoteInspectionTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A5C3A1A518C0490200C9593A /* JSGlobalObjectConsoleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5C3A1A318C0490200C9593A /* JSGlobalObjectConsoleClient.cpp */; };
</span><span class="cx">                 A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A5C3A1A418C0490200C9593A /* JSGlobalObjectConsoleClient.h */; };
</span><span class="lines">@@ -4120,6 +4121,11 @@
</span><span class="cx">                 9928FF3D18AC4B1C00B8CF12 /* JSInputs.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = JSInputs.json; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 992ABCF51BEA94CA006403A0 /* RemoteAutomationTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteAutomationTarget.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 992ABCF61BEA94CA006403A0 /* RemoteAutomationTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteAutomationTarget.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                992F56B01E4E84790035953B /* RemoteInspectorCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteInspectorCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                992F56B11E4E84790035953B /* RemoteInspectorXPCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorXPCConnection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                992F56B21E4E84790035953B /* RemoteInspectorXPCConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteInspectorXPCConnection.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                992F56B31E4E847D0035953B /* RemoteConnectionToTargetCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteConnectionToTargetCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                995566851E4E8B0700AAE13C /* RemoteInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteInspector.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9959E9271BD17FA0001AA413 /* cssmin.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = cssmin.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9959E9291BD17FA0001AA413 /* jsmin.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = jsmin.py; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9959E92A1BD17FA0001AA413 /* xxd.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = xxd.pl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4297,12 +4303,8 @@
</span><span class="cx">                 A5AB49DB1BEC8079007020FB /* PerGlobalObjectWrapperWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerGlobalObjectWrapperWorld.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5B6A74C18C6DBA600F11E91 /* ConsoleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConsoleClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5BA15E1182340B300A82E69 /* RemoteInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspector.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A5BA15E2182340B300A82E69 /* RemoteInspector.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteInspector.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorConstants.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5BA15E4182340B300A82E69 /* RemoteConnectionToTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteConnectionToTarget.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A5BA15E5182340B300A82E69 /* RemoteConnectionToTarget.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteConnectionToTarget.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorXPCConnection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteInspectorXPCConnection.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 A5BA15EF182345AF00A82E69 /* RemoteInspectionTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectionTarget.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5C3A1A318C0490200C9593A /* JSGlobalObjectConsoleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectConsoleClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A5C3A1A418C0490200C9593A /* JSGlobalObjectConsoleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectConsoleClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5042,6 +5044,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 0F9327591C20BCBA00CF6564 /* dynbench */,
</span><ins>+                                932F5BE10822A1C700736975 /* jsc */,
</ins><span class="cx">                                 0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */,
</span><span class="cx">                                 141211200A48793C00480255 /* minidom */,
</span><span class="cx">                                 0F6183431C45F62A0072450B /* testair */,
</span><span class="lines">@@ -5049,7 +5052,6 @@
</span><span class="cx">                                 0FEC85AD1BDB5CF10080FF74 /* testb3 */,
</span><span class="cx">                                 6511230514046A4C002B101D /* testRegExp */,
</span><span class="cx">                                 932F5BD90822A1C700736975 /* JavaScriptCore.framework */,
</span><del>-                                932F5BE10822A1C700736975 /* jsc */,
</del><span class="cx">                         );
</span><span class="cx">                         name = Products;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -6108,6 +6110,17 @@
</span><span class="cx">                         path = disassembler/ARMv7;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="cx">                 };
</span><ins>+                7ACDDECF1E252ACA0097AFEB /* cocoa */ = {
+                        isa = PBXGroup;
+                        children = (
+                                992F56B31E4E847D0035953B /* RemoteConnectionToTargetCocoa.mm */,
+                                992F56B01E4E84790035953B /* RemoteInspectorCocoa.mm */,
+                                992F56B11E4E84790035953B /* RemoteInspectorXPCConnection.h */,
+                                992F56B21E4E84790035953B /* RemoteInspectorXPCConnection.mm */,
+                        );
+                        path = cocoa;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 7B98D1331B60CD1E0023B1A4 /* wasm */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -6824,9 +6837,9 @@
</span><span class="cx">                                 FE384EE21ADDB7AD0055DE2C /* JSDollarVM.h */,
</span><span class="cx">                                 FE384EE31ADDB7AD0055DE2C /* JSDollarVMPrototype.cpp */,
</span><span class="cx">                                 FE384EE41ADDB7AD0055DE2C /* JSDollarVMPrototype.h */,
</span><ins>+                                86B5822C14D22F5F00A9C306 /* ProfileTreeNode.h */,
</ins><span class="cx">                                 FE3022D01E3D739600BAC493 /* SigillCrashAnalyzer.cpp */,
</span><span class="cx">                                 FE3022D11E3D739600BAC493 /* SigillCrashAnalyzer.h */,
</span><del>-                                86B5822C14D22F5F00A9C306 /* ProfileTreeNode.h */,
</del><span class="cx">                                 86B5826A14D35D5100A9C306 /* TieredMMapArray.h */,
</span><span class="cx">                                 FE3022D41E42856700BAC493 /* VMInspector.cpp */,
</span><span class="cx">                                 FE3022D51E42856700BAC493 /* VMInspector.h */,
</span><span class="lines">@@ -7110,10 +7123,10 @@
</span><span class="cx">                                 0FB1765F196B8F9E0091052A /* DFGPureValue.h */,
</span><span class="cx">                                 0F3A1BF71A9ECB7D000DE01A /* DFGPutStackSinkingPhase.cpp */,
</span><span class="cx">                                 0F3A1BF81A9ECB7D000DE01A /* DFGPutStackSinkingPhase.h */,
</span><ins>+                                86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */,
</ins><span class="cx">                                 79FC8A071E32E9F000D88F0E /* DFGRegisteredStructure.h */,
</span><span class="cx">                                 7980C16A1E3A940E00B71615 /* DFGRegisteredStructureSet.cpp */,
</span><span class="cx">                                 7980C16B1E3A940E00B71615 /* DFGRegisteredStructureSet.h */,
</span><del>-                                86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */,
</del><span class="cx">                                 0F2FCCF418A60070001A27F8 /* DFGSafepoint.cpp */,
</span><span class="cx">                                 0F2FCCF518A60070001A27F8 /* DFGSafepoint.h */,
</span><span class="cx">                                 A77A423C17A0BBFD00A8DB81 /* DFGSafeToExecute.h */,
</span><span class="lines">@@ -7642,19 +7655,17 @@
</span><span class="cx">                 A5BA15E01823409D00A82E69 /* remote */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                7ACDDECF1E252ACA0097AFEB /* cocoa */,
</ins><span class="cx">                                 992ABCF51BEA94CA006403A0 /* RemoteAutomationTarget.cpp */,
</span><span class="cx">                                 992ABCF61BEA94CA006403A0 /* RemoteAutomationTarget.h */,
</span><span class="cx">                                 A5BA15E4182340B300A82E69 /* RemoteConnectionToTarget.h */,
</span><del>-                                A5BA15E5182340B300A82E69 /* RemoteConnectionToTarget.mm */,
</del><span class="cx">                                 998ED6721BED659A00DD8017 /* RemoteControllableTarget.cpp */,
</span><span class="cx">                                 998ED6731BED659A00DD8017 /* RemoteControllableTarget.h */,
</span><span class="cx">                                 A594558E18245EDE00CC3843 /* RemoteInspectionTarget.cpp */,
</span><span class="cx">                                 A5BA15EF182345AF00A82E69 /* RemoteInspectionTarget.h */,
</span><ins>+                                995566851E4E8B0700AAE13C /* RemoteInspector.cpp */,
</ins><span class="cx">                                 A5BA15E1182340B300A82E69 /* RemoteInspector.h */,
</span><del>-                                A5BA15E2182340B300A82E69 /* RemoteInspector.mm */,
</del><span class="cx">                                 A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */,
</span><del>-                                A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */,
-                                A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */,
</del><span class="cx">                         );
</span><span class="cx">                         path = remote;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -8097,7 +8108,6 @@
</span><span class="cx">                                 0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */,
</span><span class="cx">                                 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */,
</span><span class="cx">                                 0FA762051DB9242900B7A2FD /* CollectionScope.h in Headers */,
</span><del>-                                79FC8A081E32E9F000D88F0E /* DFGRegisteredStructure.h in Headers */,
</del><span class="cx">                                 A53243981856A489002ED692 /* CombinedDomains.json in Headers */,
</span><span class="cx">                                 BC18C3F30E16F5CD00B34460 /* CommonIdentifiers.h in Headers */,
</span><span class="cx">                                 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */,
</span><span class="lines">@@ -8292,6 +8302,8 @@
</span><span class="cx">                                 0FB17663196B8F9E0091052A /* DFGPureValue.h in Headers */,
</span><span class="cx">                                 0F3A1BFA1A9ECB7D000DE01A /* DFGPutStackSinkingPhase.h in Headers */,
</span><span class="cx">                                 86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */,
</span><ins>+                                79FC8A081E32E9F000D88F0E /* DFGRegisteredStructure.h in Headers */,
+                                7980C16D1E3A940E00B71615 /* DFGRegisteredStructureSet.h in Headers */,
</ins><span class="cx">                                 0F2FCCFC18A60070001A27F8 /* DFGSafepoint.h in Headers */,
</span><span class="cx">                                 A77A424317A0BBFD00A8DB81 /* DFGSafeToExecute.h in Headers */,
</span><span class="cx">                                 A741017F179DAF80002EB8BA /* DFGSaneStringGetByValSlowPathGenerator.h in Headers */,
</span><span class="lines">@@ -8454,7 +8466,6 @@
</span><span class="cx">                                 0F86A26F1D6F7B3300CB0C92 /* GCTypeMap.h in Headers */,
</span><span class="cx">                                 9959E9311BD18272001AA413 /* generate-combined-inspector-json.py in Headers */,
</span><span class="cx">                                 C4703CC0192844960013FBEA /* generate-inspector-protocol-bindings.py in Headers */,
</span><del>-                                FE3022D91E43C93400BAC493 /* JSVirtualMachinePrivate.h in Headers */,
</del><span class="cx">                                 99DA00AF1BD5994E00F4575C /* generate-js-builtins.py in Headers */,
</span><span class="cx">                                 A5EA70EC19F5B3EA0098F5EC /* generate_cpp_alternate_backend_dispatcher_header.py in Headers */,
</span><span class="cx">                                 A5EF9B141A1D43F600702E90 /* generate_cpp_backend_dispatcher_header.py in Headers */,
</span><span class="lines">@@ -8691,7 +8702,6 @@
</span><span class="cx">                                 A50E4B6418809DD50068A46D /* JSGlobalObjectRuntimeAgent.h in Headers */,
</span><span class="cx">                                 A503FA2A188F105900110F14 /* JSGlobalObjectScriptDebugServer.h in Headers */,
</span><span class="cx">                                 A513E5C0185BFACC007E95AD /* JSInjectedScriptHost.h in Headers */,
</span><del>-                                7980C16D1E3A940E00B71615 /* DFGRegisteredStructureSet.h in Headers */,
</del><span class="cx">                                 A513E5C2185BFACC007E95AD /* JSInjectedScriptHostPrototype.h in Headers */,
</span><span class="cx">                                 C442CB251A6CDB8C005D3D7C /* JSInputs.json in Headers */,
</span><span class="cx">                                 0F2B66F817B6B5AB00A7AE3F /* JSInt16Array.h in Headers */,
</span><span class="lines">@@ -8771,6 +8781,7 @@
</span><span class="cx">                                 BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */,
</span><span class="cx">                                 86E3C615167BABD7006D760A /* JSVirtualMachine.h in Headers */,
</span><span class="cx">                                 86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */,
</span><ins>+                                FE3022D91E43C93400BAC493 /* JSVirtualMachinePrivate.h in Headers */,
</ins><span class="cx">                                 A7CA3AE817DA41AE006538AF /* JSWeakMap.h in Headers */,
</span><span class="cx">                                 A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
</span><span class="cx">                                 A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
</span><span class="lines">@@ -8808,7 +8819,6 @@
</span><span class="cx">                                 FE3913561B794F8F00EDAF71 /* LiveObjectList.h in Headers */,
</span><span class="cx">                                 70DE9A091BE7D69E005D89D9 /* LLIntAssembly.h in Headers */,
</span><span class="cx">                                 0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */,
</span><del>-                                FE3022D31E3D73A500BAC493 /* SigillCrashAnalyzer.h in Headers */,
</del><span class="cx">                                 FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */,
</span><span class="cx">                                 0F4680CA14BBB16C00BFE272 /* LLIntCommon.h in Headers */,
</span><span class="cx">                                 0F4680D314BBD16700BFE272 /* LLIntData.h in Headers */,
</span><span class="lines">@@ -8868,7 +8878,6 @@
</span><span class="cx">                                 A79D3ED9C5064DD0A8466A3A /* ModuleScopeData.h in Headers */,
</span><span class="cx">                                 0F1FB3991E1F65FB00A9BE50 /* MutatorScheduler.h in Headers */,
</span><span class="cx">                                 0FA762071DB9243300B7A2FD /* MutatorState.h in Headers */,
</span><del>-                                FE3022D71E42857300BAC493 /* VMInspector.h in Headers */,
</del><span class="cx">                                 BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */,
</span><span class="cx">                                 BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */,
</span><span class="cx">                                 147341D01DC02DB400AA29BA /* NativeExecutable.h in Headers */,
</span><span class="lines">@@ -8978,7 +8987,7 @@
</span><span class="cx">                                 A5BA15F0182345AF00A82E69 /* RemoteInspectionTarget.h in Headers */,
</span><span class="cx">                                 A5BA15E8182340B300A82E69 /* RemoteInspector.h in Headers */,
</span><span class="cx">                                 A5BA15EA182340B400A82E69 /* RemoteInspectorConstants.h in Headers */,
</span><del>-                                A5BA15ED182340B400A82E69 /* RemoteInspectorXPCConnection.h in Headers */,
</del><ins>+                                992F56B71E4E84B20035953B /* RemoteInspectorXPCConnection.h in Headers */,
</ins><span class="cx">                                 0F24E55117EE274900ABB217 /* Repatch.h in Headers */,
</span><span class="cx">                                 869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */,
</span><span class="cx">                                 70B0A9D11A9B66460001306A /* RuntimeFlags.h in Headers */,
</span><span class="lines">@@ -9008,6 +9017,7 @@
</span><span class="cx">                                 0FEE98411A8865B700754E93 /* SetupVarargsFrame.h in Headers */,
</span><span class="cx">                                 DC17E8181C9C91D9008A6AB3 /* ShadowChicken.h in Headers */,
</span><span class="cx">                                 DC17E8191C9C91DB008A6AB3 /* ShadowChickenInlines.h in Headers */,
</span><ins>+                                FE3022D31E3D73A500BAC493 /* SigillCrashAnalyzer.h in Headers */,
</ins><span class="cx">                                 0F2B670517B6B5AB00A7AE3F /* SimpleTypedArrayController.h in Headers */,
</span><span class="cx">                                 14BA78F113AAB88F005B7C2C /* SlotVisitor.h in Headers */,
</span><span class="cx">                                 C2160FE715F7E95E00942DFC /* SlotVisitorInlines.h in Headers */,
</span><span class="lines">@@ -9126,6 +9136,7 @@
</span><span class="cx">                                 658D3A5619638268003C45D6 /* VMEntryRecord.h in Headers */,
</span><span class="cx">                                 FE5932A8183C5A2600A1ECCC /* VMEntryScope.h in Headers */,
</span><span class="cx">                                 0F5AE2C41DF4F2800066EFE1 /* VMInlines.h in Headers */,
</span><ins>+                                FE3022D71E42857300BAC493 /* VMInspector.h in Headers */,
</ins><span class="cx">                                 53F40E931D5A4AB30099A1B6 /* WasmB3IRGenerator.h in Headers */,
</span><span class="cx">                                 AD4B1DFA1DF244E20071AE32 /* WasmBinding.h in Headers */,
</span><span class="cx">                                 53FD04D41D7AB291003287D3 /* WasmCallingConvention.h in Headers */,
</span><span class="lines">@@ -9735,7 +9746,6 @@
</span><span class="cx">                                 0F9630391D4192C6005609D9 /* AllocatorAttributes.cpp in Sources */,
</span><span class="cx">                                 147F39BD107EC37600427A48 /* ArgList.cpp in Sources */,
</span><span class="cx">                                 79A228351D35D71E00D8E067 /* ArithProfile.cpp in Sources */,
</span><del>-                                FE3022D61E42857300BAC493 /* VMInspector.cpp in Sources */,
</del><span class="cx">                                 0F743BAA16B88249009F9277 /* ARM64Disassembler.cpp in Sources */,
</span><span class="cx">                                 86D3B2C310156BDE002865E7 /* ARMAssembler.cpp in Sources */,
</span><span class="cx">                                 65C02850171795E200351E35 /* ARMv7Disassembler.cpp in Sources */,
</span><span class="lines">@@ -10005,6 +10015,7 @@
</span><span class="cx">                                 0F2B9CEC19D0BA7D00B1D1B5 /* DFGPromotedHeapLocation.cpp in Sources */,
</span><span class="cx">                                 0FB17662196B8F9E0091052A /* DFGPureValue.cpp in Sources */,
</span><span class="cx">                                 0F3A1BF91A9ECB7D000DE01A /* DFGPutStackSinkingPhase.cpp in Sources */,
</span><ins>+                                7980C16C1E3A940E00B71615 /* DFGRegisteredStructureSet.cpp in Sources */,
</ins><span class="cx">                                 0F2FCCFB18A60070001A27F8 /* DFGSafepoint.cpp in Sources */,
</span><span class="cx">                                 86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */,
</span><span class="cx">                                 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */,
</span><span class="lines">@@ -10058,7 +10069,6 @@
</span><span class="cx">                                 14AD91171DCA97FD0014F9FE /* EvalCodeBlock.cpp in Sources */,
</span><span class="cx">                                 147341E21DC2CE9600AA29BA /* EvalExecutable.cpp in Sources */,
</span><span class="cx">                                 A54982031891D0B00081E5B8 /* EventLoop.cpp in Sources */,
</span><del>-                                7980C16C1E3A940E00B71615 /* DFGRegisteredStructureSet.cpp in Sources */,
</del><span class="cx">                                 FE1C0FFF1B194FD100B53FCA /* Exception.cpp in Sources */,
</span><span class="cx">                                 FE80C19B1D776A98008510C0 /* ExceptionEventLocation.cpp in Sources */,
</span><span class="cx">                                 0F12DE0F1979D5FD0006FF4E /* ExceptionFuzz.cpp in Sources */,
</span><span class="lines">@@ -10431,7 +10441,6 @@
</span><span class="cx">                                 79B00CBE1C6AB07E0088C65D /* ProxyObject.cpp in Sources */,
</span><span class="cx">                                 79160DBD1C8E3EC8008C085A /* ProxyRevoke.cpp in Sources */,
</span><span class="cx">                                 0F15CD221BA5F9860031FFD3 /* PutByIdFlags.cpp in Sources */,
</span><del>-                                FE3022D21E3D73A500BAC493 /* SigillCrashAnalyzer.cpp in Sources */,
</del><span class="cx">                                 0F9332A314CA7DD70085F3C6 /* PutByIdStatus.cpp in Sources */,
</span><span class="cx">                                 0F93B4A918B92C4D00178A3F /* PutByIdVariant.cpp in Sources */,
</span><span class="cx">                                 0FF60AC316740F8800029779 /* ReduceWhitespace.cpp in Sources */,
</span><span class="lines">@@ -10449,11 +10458,12 @@
</span><span class="cx">                                 0FC3141518146D7000033232 /* RegisterSet.cpp in Sources */,
</span><span class="cx">                                 A57D23ED1891B5540031C7FA /* RegularExpression.cpp in Sources */,
</span><span class="cx">                                 992ABCF91BEA9BD2006403A0 /* RemoteAutomationTarget.cpp in Sources */,
</span><del>-                                A5BA15EC182340B400A82E69 /* RemoteConnectionToTarget.mm in Sources */,
</del><ins>+                                992F56B41E4E84A40035953B /* RemoteConnectionToTargetCocoa.mm in Sources */,
</ins><span class="cx">                                 998ED6741BED70AC00DD8017 /* RemoteControllableTarget.cpp in Sources */,
</span><span class="cx">                                 A594558F18245EFD00CC3843 /* RemoteInspectionTarget.cpp in Sources */,
</span><del>-                                A5BA15E9182340B300A82E69 /* RemoteInspector.mm in Sources */,
-                                A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */,
</del><ins>+                                995566861E4E8B0F00AAE13C /* RemoteInspector.cpp in Sources */,
+                                992F56B51E4E84A80035953B /* RemoteInspectorCocoa.mm in Sources */,
+                                992F56B61E4E84AB0035953B /* RemoteInspectorXPCConnection.mm in Sources */,
</ins><span class="cx">                                 0F24E55017EE274900ABB217 /* Repatch.cpp in Sources */,
</span><span class="cx">                                 527773DE1AAF83AC00BDE7E8 /* RuntimeType.cpp in Sources */,
</span><span class="cx">                                 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */,
</span><span class="lines">@@ -10476,6 +10486,7 @@
</span><span class="cx">                                 A7299DA117D12848005F5FF9 /* SetPrototype.cpp in Sources */,
</span><span class="cx">                                 0FEE98431A89227500754E93 /* SetupVarargsFrame.cpp in Sources */,
</span><span class="cx">                                 DC17E8171C9C91D6008A6AB3 /* ShadowChicken.cpp in Sources */,
</span><ins>+                                FE3022D21E3D73A500BAC493 /* SigillCrashAnalyzer.cpp in Sources */,
</ins><span class="cx">                                 0F2B670417B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp in Sources */,
</span><span class="cx">                                 C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */,
</span><span class="cx">                                 9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */,
</span><span class="lines">@@ -10550,6 +10561,7 @@
</span><span class="cx">                                 0F952AA21DF7860D00E06FBD /* VisitRaceKey.cpp in Sources */,
</span><span class="cx">                                 E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */,
</span><span class="cx">                                 FE5932A7183C5A2600A1ECCC /* VMEntryScope.cpp in Sources */,
</span><ins>+                                FE3022D61E42857300BAC493 /* VMInspector.cpp in Sources */,
</ins><span class="cx">                                 53F40E8F1D5902820099A1B6 /* WasmB3IRGenerator.cpp in Sources */,
</span><span class="cx">                                 AD4B1DF91DF244E20071AE32 /* WasmBinding.cpp in Sources */,
</span><span class="cx">                                 53FD04D31D7AB277003287D3 /* WasmCallingConvention.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/PlatformMac.cmake (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/PlatformMac.cmake        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/PlatformMac.cmake        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -10,10 +10,13 @@
</span><span class="cx">     API/ObjCCallbackFunction.mm
</span><span class="cx"> 
</span><span class="cx">     inspector/remote/RemoteAutomationTarget.cpp
</span><del>-    inspector/remote/RemoteConnectionToTarget.mm
</del><span class="cx">     inspector/remote/RemoteControllableTarget.cpp
</span><span class="cx">     inspector/remote/RemoteInspectionTarget.cpp
</span><del>-    inspector/remote/RemoteInspector.mm
</del><ins>+    inspector/remote/RemoteInspector.cpp
+
+    inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm
+    inspector/remote/cocoa/RemoteInspectorCocoa.mm
+    inspector/remote/cocoa/RemoteInspectorXPCConnection.mm
</ins><span class="cx"> )
</span><span class="cx"> add_definitions(-DSTATICALLY_LINKED_WITH_WTF -D__STDC_WANT_LIB_EXT1__)
</span><span class="cx"> 
</span><span class="lines">@@ -25,6 +28,7 @@
</span><span class="cx"> list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/disassembler/udis86
</span><span class="cx">     ${JAVASCRIPTCORE_DIR}/icu
</span><ins>+    ${JAVASCRIPTCORE_DIR}/inspector/remote/cocoa
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} &quot;-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}&quot;)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteConnectionToTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.h (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.h        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.h        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -27,33 +27,44 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx"> 
</span><del>-#import &quot;InspectorFrontendChannel.h&quot;
-#import &quot;RemoteConnectionToTarget.h&quot;
-#import &quot;RemoteInspector.h&quot;
-#import &lt;mutex&gt;
-#import &lt;wtf/BlockPtr.h&gt;
-#import &lt;wtf/Lock.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-#import &lt;wtf/ThreadSafeRefCounted.h&gt;
</del><ins>+#include &quot;InspectorFrontendChannel.h&quot;
+#include &lt;wtf/Lock.h&gt;
+#include &lt;wtf/ThreadSafeRefCounted.h&gt;
</ins><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
+#include &lt;wtf/BlockPtr.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
</ins><span class="cx"> OBJC_CLASS NSString;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> namespace Inspector {
</span><span class="cx"> 
</span><ins>+class RemoteControllableTarget;
+
+#if PLATFORM(COCOA)
</ins><span class="cx"> typedef Vector&lt;BlockPtr&lt;void ()&gt;&gt; RemoteTargetQueue;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> class RemoteConnectionToTarget final : public ThreadSafeRefCounted&lt;RemoteConnectionToTarget&gt;, public FrontendChannel {
</span><span class="cx"> public:
</span><del>-    RemoteConnectionToTarget(RemoteControllableTarget*, NSString *connectionIdentifier, NSString *destination);
</del><ins>+#if PLATFORM(COCOA)
+    RemoteConnectionToTarget(RemoteControllableTarget*, NSString* connectionIdentifier, NSString* destination);
+#endif
</ins><span class="cx">     virtual ~RemoteConnectionToTarget();
</span><span class="cx"> 
</span><span class="cx">     // Main API.
</span><span class="cx">     bool setup(bool isAutomaticInspection = false, bool automaticallyPause = false);
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     void sendMessageToTarget(NSString *);
</span><ins>+#else
+    void sendMessageToTarget(const String&amp;);
+#endif
</ins><span class="cx">     void close();
</span><span class="cx">     void targetClosed();
</span><span class="cx"> 
</span><span class="cx">     std::optional&lt;unsigned&gt; targetIdentifier() const;
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     NSString *connectionIdentifier() const;
</span><span class="cx">     NSString *destination() const;
</span><span class="cx"> 
</span><span class="lines">@@ -60,6 +71,7 @@
</span><span class="cx">     Lock&amp; queueMutex() { return m_queueMutex; }
</span><span class="cx">     const RemoteTargetQueue&amp; queue() const { return m_queue; }
</span><span class="cx">     void clearQueue() { m_queue.clear(); }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     // FrontendChannel overrides.
</span><span class="cx">     ConnectionType connectionType() const override { return ConnectionType::Remote; }
</span><span class="lines">@@ -66,11 +78,13 @@
</span><span class="cx">     void sendMessageToFrontend(const String&amp;) override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     void dispatchAsyncOnTarget(void (^block)());
</span><span class="cx"> 
</span><span class="cx">     void setupRunLoop();
</span><span class="cx">     void teardownRunLoop();
</span><span class="cx">     void queueTaskOnPrivateRunLoop(void (^block)());
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     // This connection from the RemoteInspector singleton to the InspectionTarget
</span><span class="cx">     // can be used on multiple threads. So any access to the target
</span><span class="lines">@@ -77,6 +91,7 @@
</span><span class="cx">     // itself must take this mutex to ensure m_target is valid.
</span><span class="cx">     Lock m_targetMutex;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     // If a target has a specific run loop it wants to evaluate on
</span><span class="cx">     // we setup our run loop sources on that specific run loop.
</span><span class="cx">     RetainPtr&lt;CFRunLoopRef&gt; m_runLoop;
</span><span class="lines">@@ -83,11 +98,15 @@
</span><span class="cx">     RetainPtr&lt;CFRunLoopSourceRef&gt; m_runLoopSource;
</span><span class="cx">     RemoteTargetQueue m_queue;
</span><span class="cx">     Lock m_queueMutex;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     RemoteControllableTarget* m_target { nullptr };
</span><ins>+    bool m_connected { false };
+
+#if PLATFORM(COCOA)
</ins><span class="cx">     RetainPtr&lt;NSString&gt; m_connectionIdentifier;
</span><span class="cx">     RetainPtr&lt;NSString&gt; m_destination;
</span><del>-    bool m_connected { false };
</del><ins>+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteConnectionToTargetmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.mm (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.mm        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteConnectionToTarget.mm        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1,283 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013, 2015 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.
- */
-
-#import &quot;config.h&quot;
-#import &quot;RemoteConnectionToTarget.h&quot;
-
-#if ENABLE(REMOTE_INSPECTOR)
-
-#import &quot;EventLoop.h&quot;
-#import &quot;RemoteAutomationTarget.h&quot;
-#import &quot;RemoteInspectionTarget.h&quot;
-#import &lt;dispatch/dispatch.h&gt;
-#import &lt;wtf/Optional.h&gt;
-
-#if PLATFORM(IOS)
-#import &lt;wtf/ios/WebCoreThread.h&gt;
-#endif
-
-namespace Inspector {
-
-static StaticLock rwiQueueMutex;
-static CFRunLoopSourceRef rwiRunLoopSource;
-static RemoteTargetQueue* rwiQueue;
-
-static void RemoteTargetHandleRunSourceGlobal(void*)
-{
-    ASSERT(CFRunLoopGetCurrent() == CFRunLoopGetMain());
-    ASSERT(rwiRunLoopSource);
-    ASSERT(rwiQueue);
-
-    RemoteTargetQueue queueCopy;
-    {
-        std::lock_guard&lt;StaticLock&gt; lock(rwiQueueMutex);
-        queueCopy = *rwiQueue;
-        rwiQueue-&gt;clear();
-    }
-
-    for (const auto&amp; block : queueCopy)
-        block();
-}
-
-static void RemoteTargetQueueTaskOnGlobalQueue(void (^task)())
-{
-    ASSERT(rwiRunLoopSource);
-    ASSERT(rwiQueue);
-
-    {
-        std::lock_guard&lt;StaticLock&gt; lock(rwiQueueMutex);
-        rwiQueue-&gt;append(task);
-    }
-
-    CFRunLoopSourceSignal(rwiRunLoopSource);
-    CFRunLoopWakeUp(CFRunLoopGetMain());
-}
-
-static void RemoteTargetInitializeGlobalQueue()
-{
-    static dispatch_once_t pred;
-    dispatch_once(&amp;pred, ^{
-        rwiQueue = new RemoteTargetQueue;
-
-        CFRunLoopSourceContext runLoopSourceContext = {0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, RemoteTargetHandleRunSourceGlobal};
-        rwiRunLoopSource = CFRunLoopSourceCreate(kCFAllocatorDefault, 1, &amp;runLoopSourceContext);
-
-        // Add to the default run loop mode for default handling, and the JSContext remote inspector run loop mode when paused.
-        CFRunLoopAddSource(CFRunLoopGetMain(), rwiRunLoopSource, kCFRunLoopDefaultMode);
-        CFRunLoopAddSource(CFRunLoopGetMain(), rwiRunLoopSource, EventLoop::remoteInspectorRunLoopMode());
-    });
-}
-
-static void RemoteTargetHandleRunSourceWithInfo(void* info)
-{
-    RemoteConnectionToTarget *connectionToTarget = static_cast&lt;RemoteConnectionToTarget*&gt;(info);
-
-    RemoteTargetQueue queueCopy;
-    {
-        std::lock_guard&lt;Lock&gt; lock(connectionToTarget-&gt;queueMutex());
-        queueCopy = connectionToTarget-&gt;queue();
-        connectionToTarget-&gt;clearQueue();
-    }
-
-    for (const auto&amp; block : queueCopy)
-        block();
-}
-
-
-RemoteConnectionToTarget::RemoteConnectionToTarget(RemoteControllableTarget* target, NSString *connectionIdentifier, NSString *destination)
-    : m_target(target)
-    , m_connectionIdentifier(connectionIdentifier)
-    , m_destination(destination)
-{
-    setupRunLoop();
-}
-
-RemoteConnectionToTarget::~RemoteConnectionToTarget()
-{
-    teardownRunLoop();
-}
-
-std::optional&lt;unsigned&gt; RemoteConnectionToTarget::targetIdentifier() const
-{
-    return m_target ? std::optional&lt;unsigned&gt;(m_target-&gt;targetIdentifier()) : std::nullopt;
-}
-
-NSString *RemoteConnectionToTarget::connectionIdentifier() const
-{
-    return [[m_connectionIdentifier copy] autorelease];
-}
-
-NSString *RemoteConnectionToTarget::destination() const
-{
-    return [[m_destination copy] autorelease];
-}
-
-void RemoteConnectionToTarget::dispatchAsyncOnTarget(void (^block)())
-{
-    if (m_runLoop) {
-        queueTaskOnPrivateRunLoop(block);
-        return;
-    }
-
-#if PLATFORM(IOS)
-    if (WebCoreWebThreadIsEnabled &amp;&amp; WebCoreWebThreadIsEnabled()) {
-        WebCoreWebThreadRun(block);
-        return;
-    }
-#endif
-
-    RemoteTargetQueueTaskOnGlobalQueue(block);
-}
-
-bool RemoteConnectionToTarget::setup(bool isAutomaticInspection, bool automaticallyPause)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_targetMutex);
-
-    if (!m_target)
-        return false;
-
-    ref();
-    dispatchAsyncOnTarget(^{
-        {
-            std::lock_guard&lt;Lock&gt; lock(m_targetMutex);
-            if (!m_target || !m_target-&gt;remoteControlAllowed()) {
-                RemoteInspector::singleton().setupFailed(targetIdentifier().value_or(0));
-                m_target = nullptr;
-            } else if (is&lt;RemoteInspectionTarget&gt;(m_target)) {
-                auto castedTarget = downcast&lt;RemoteInspectionTarget&gt;(m_target);
-                castedTarget-&gt;connect(this, isAutomaticInspection);
-                m_connected = true;
-
-                if (automaticallyPause)
-                    castedTarget-&gt;pause();
-            } else if (is&lt;RemoteAutomationTarget&gt;(m_target)) {
-                auto castedTarget = downcast&lt;RemoteAutomationTarget&gt;(m_target);
-                castedTarget-&gt;connect(this);
-                m_connected = true;
-            }
-        }
-        deref();
-    });
-
-    return true;
-}
-
-void RemoteConnectionToTarget::targetClosed()
-{
-    std::lock_guard&lt;Lock&gt; lock(m_targetMutex);
-
-    m_target = nullptr;
-}
-
-void RemoteConnectionToTarget::close()
-{
-    ref();
-    dispatchAsyncOnTarget(^{
-        {
-            std::lock_guard&lt;Lock&gt; lock(m_targetMutex);
-
-            if (m_target) {
-                if (m_connected)
-                    m_target-&gt;disconnect(this);
-
-                m_target = nullptr;
-            }
-        }
-        deref();
-    });
-}
-
-void RemoteConnectionToTarget::sendMessageToTarget(NSString *message)
-{
-    ref();
-    dispatchAsyncOnTarget(^{
-        {
-            RemoteControllableTarget* target = nullptr;
-            {
-                std::lock_guard&lt;Lock&gt; lock(m_targetMutex);
-                if (!m_target)
-                    return;
-                target = m_target;
-            }
-
-            target-&gt;dispatchMessageFromRemote(message);
-        }
-        deref();
-    });
-}
-
-void RemoteConnectionToTarget::sendMessageToFrontend(const String&amp; message)
-{
-    if (!targetIdentifier())
-        return;
-
-    RemoteInspector::singleton().sendMessageToRemote(targetIdentifier().value(), message);
-}
-
-void RemoteConnectionToTarget::setupRunLoop()
-{
-    CFRunLoopRef targetRunLoop = m_target-&gt;targetRunLoop();
-    if (!targetRunLoop) {
-        RemoteTargetInitializeGlobalQueue();
-        return;
-    }
-
-    m_runLoop = targetRunLoop;
-
-    CFRunLoopSourceContext runLoopSourceContext = {0, this, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, RemoteTargetHandleRunSourceWithInfo};
-    m_runLoopSource = adoptCF(CFRunLoopSourceCreate(kCFAllocatorDefault, 1, &amp;runLoopSourceContext));
-
-    CFRunLoopAddSource(m_runLoop.get(), m_runLoopSource.get(), kCFRunLoopDefaultMode);
-    CFRunLoopAddSource(m_runLoop.get(), m_runLoopSource.get(), EventLoop::remoteInspectorRunLoopMode());
-}
-
-void RemoteConnectionToTarget::teardownRunLoop()
-{
-    if (!m_runLoop)
-        return;
-
-    CFRunLoopRemoveSource(m_runLoop.get(), m_runLoopSource.get(), kCFRunLoopDefaultMode);
-    CFRunLoopRemoveSource(m_runLoop.get(), m_runLoopSource.get(), EventLoop::remoteInspectorRunLoopMode());
-
-    m_runLoop = nullptr;
-    m_runLoopSource = nullptr;
-}
-
-void RemoteConnectionToTarget::queueTaskOnPrivateRunLoop(void (^block)())
-{
-    ASSERT(m_runLoop);
-
-    {
-        std::lock_guard&lt;Lock&gt; lock(m_queueMutex);
-        m_queue.append(block);
-    }
-
-    CFRunLoopSourceSignal(m_runLoopSource.get());
-    CFRunLoopWakeUp(m_runLoop.get());
-}
-
-} // namespace Inspector
-
-#endif // ENABLE(REMOTE_INSPECTOR)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteControllableTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteControllableTarget.h (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteControllableTarget.h        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteControllableTarget.h        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -27,10 +27,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx"> 
</span><del>-#include &lt;CoreFoundation/CFRunLoop.h&gt;
</del><span class="cx"> #include &lt;wtf/TypeCasts.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+#if USE(CF)
+#include &lt;CoreFoundation/CFRunLoop.h&gt;
+#endif
+
</ins><span class="cx"> namespace Inspector {
</span><span class="cx"> 
</span><span class="cx"> class FrontendChannel;
</span><span class="lines">@@ -53,8 +56,10 @@
</span><span class="cx">     virtual bool remoteControlAllowed() const = 0;
</span><span class="cx">     virtual void dispatchMessageFromRemote(const String&amp; message) = 0;
</span><span class="cx"> 
</span><ins>+#if USE(CF)
</ins><span class="cx">     // The dispatch block will be scheduled on a global run loop if null is returned.
</span><span class="cx">     virtual CFRunLoopRef targetRunLoop() { return nullptr; }
</span><ins>+#endif
</ins><span class="cx"> private:
</span><span class="cx">     unsigned m_identifier {0};
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectionTargeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -41,8 +41,10 @@
</span><span class="cx">     bool remoteDebuggingAllowed() const { return m_allowed; }
</span><span class="cx">     void setRemoteDebuggingAllowed(bool);
</span><span class="cx"> 
</span><ins>+#if USE(CF)
</ins><span class="cx">     CFRunLoopRef targetRunLoop() override { return m_runLoop.get(); }
</span><span class="cx">     void setTargetRunLoop(CFRunLoopRef runLoop) { m_runLoop = runLoop; }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     virtual String name() const { return String(); } // JavaScript and Web
</span><span class="cx">     virtual String url() const { return String(); } // Web
</span><span class="lines">@@ -59,7 +61,9 @@
</span><span class="cx">     bool remoteControlAllowed() const override;
</span><span class="cx"> private:
</span><span class="cx">     bool m_allowed {false};
</span><ins>+#if USE(CF)
</ins><span class="cx">     RetainPtr&lt;CFRunLoopRef&gt; m_runLoop;
</span><ins>+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace Inspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -27,14 +27,18 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx"> 
</span><del>-#import &quot;RemoteInspectorXPCConnection.h&quot;
-#import &lt;wtf/Forward.h&gt;
-#import &lt;wtf/HashMap.h&gt;
-#import &lt;wtf/Lock.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
</del><ins>+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/Lock.h&gt;
</ins><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
+#include &quot;RemoteInspectorXPCConnection.h&quot;
+#include &lt;wtf/RetainPtr.h&gt;
+
</ins><span class="cx"> OBJC_CLASS NSDictionary;
</span><span class="cx"> OBJC_CLASS NSString;
</span><ins>+typedef RetainPtr&lt;NSDictionary&gt; TargetListing;
+#endif
</ins><span class="cx"> 
</span><span class="cx"> namespace Inspector {
</span><span class="cx"> 
</span><span class="lines">@@ -44,7 +48,11 @@
</span><span class="cx"> class RemoteInspectionTarget;
</span><span class="cx"> class RemoteInspectorClient;
</span><span class="cx"> 
</span><del>-class JS_EXPORT_PRIVATE RemoteInspector final : public RemoteInspectorXPCConnection::Client {
</del><ins>+class JS_EXPORT_PRIVATE RemoteInspector final
+#if PLATFORM(COCOA)
+    : public RemoteInspectorXPCConnection::Client
+#endif
+{
</ins><span class="cx"> public:
</span><span class="cx">     class Client {
</span><span class="cx">     public:
</span><span class="lines">@@ -80,11 +88,13 @@
</span><span class="cx">     void start();
</span><span class="cx">     void stop();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     bool hasParentProcessInformation() const { return m_parentProcessIdentifier != 0; }
</span><span class="cx">     pid_t parentProcessIdentifier() const { return m_parentProcessIdentifier; }
</span><span class="cx">     RetainPtr&lt;CFDataRef&gt; parentProcessAuditData() const { return m_parentProcessAuditData; }
</span><span class="cx">     void setParentProcessInformation(pid_t, RetainPtr&lt;CFDataRef&gt; auditData);
</span><span class="cx">     void setParentProcessInfomationIsDelayed();
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     RemoteInspector();
</span><span class="lines">@@ -94,11 +104,14 @@
</span><span class="cx">     enum class StopSource { API, XPCMessage };
</span><span class="cx">     void stopInternal(StopSource);
</span><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     void setupXPCConnectionIfNeeded();
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-    RetainPtr&lt;NSDictionary&gt; listingForTarget(const RemoteControllableTarget&amp;) const;
-    RetainPtr&lt;NSDictionary&gt; listingForInspectionTarget(const RemoteInspectionTarget&amp;) const;
-    RetainPtr&lt;NSDictionary&gt; listingForAutomationTarget(const RemoteAutomationTarget&amp;) const;
</del><ins>+    TargetListing listingForTarget(const RemoteControllableTarget&amp;) const;
+    TargetListing listingForInspectionTarget(const RemoteInspectionTarget&amp;) const;
+    TargetListing listingForAutomationTarget(const RemoteAutomationTarget&amp;) const;
+
</ins><span class="cx">     void pushListingsNow();
</span><span class="cx">     void pushListingsSoon();
</span><span class="cx"> 
</span><span class="lines">@@ -110,6 +123,7 @@
</span><span class="cx"> 
</span><span class="cx">     void sendAutomaticInspectionCandidateMessage();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     void xpcConnectionReceivedMessage(RemoteInspectorXPCConnection*, NSString *messageName, NSDictionary *userInfo) override;
</span><span class="cx">     void xpcConnectionFailed(RemoteInspectorXPCConnection*) override;
</span><span class="cx">     void xpcConnectionUnhandledMessage(RemoteInspectorXPCConnection*, xpc_object_t) override;
</span><span class="lines">@@ -124,6 +138,7 @@
</span><span class="cx">     void receivedAutomaticInspectionConfigurationMessage(NSDictionary *userInfo);
</span><span class="cx">     void receivedAutomaticInspectionRejectMessage(NSDictionary *userInfo);
</span><span class="cx">     void receivedAutomationSessionRequestMessage(NSDictionary *userInfo);
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     static bool startEnabled;
</span><span class="cx"> 
</span><span class="lines">@@ -134,15 +149,19 @@
</span><span class="cx">     Lock m_mutex;
</span><span class="cx"> 
</span><span class="cx">     HashMap&lt;unsigned, RemoteControllableTarget*&gt; m_targetMap;
</span><del>-    HashMap&lt;unsigned, RetainPtr&lt;NSDictionary&gt;&gt; m_targetListingMap;
</del><span class="cx">     HashMap&lt;unsigned, RefPtr&lt;RemoteConnectionToTarget&gt;&gt; m_targetConnectionMap;
</span><ins>+    HashMap&lt;unsigned, TargetListing&gt; m_targetListingMap;
</ins><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     RefPtr&lt;RemoteInspectorXPCConnection&gt; m_relayConnection;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     RemoteInspector::Client* m_client { nullptr };
</span><span class="cx">     std::optional&lt;RemoteInspector::Client::Capabilities&gt; m_clientCapabilities;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     dispatch_queue_t m_xpcQueue;
</span><ins>+#endif
</ins><span class="cx">     unsigned m_nextAvailableTargetIdentifier { 1 };
</span><span class="cx">     int m_notifyToken { 0 };
</span><span class="cx">     bool m_enabled { false };
</span><span class="lines">@@ -150,7 +169,9 @@
</span><span class="cx">     bool m_pushScheduled { false };
</span><span class="cx"> 
</span><span class="cx">     pid_t m_parentProcessIdentifier { 0 };
</span><ins>+#if PLATFORM(COCOA)
</ins><span class="cx">     RetainPtr&lt;CFDataRef&gt; m_parentProcessAuditData;
</span><ins>+#endif
</ins><span class="cx">     bool m_shouldSendParentProcessInformation { false };
</span><span class="cx">     bool m_automaticInspectionEnabled { false };
</span><span class="cx">     bool m_automaticInspectionPaused { false };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectormm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1,857 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013-2016 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.
- */
-
-#import &quot;config.h&quot;
-#import &quot;RemoteInspector.h&quot;
-
-#if ENABLE(REMOTE_INSPECTOR)
-
-#import &quot;InitializeThreading.h&quot;
-#import &quot;RemoteAutomationTarget.h&quot;
-#import &quot;RemoteConnectionToTarget.h&quot;
-#import &quot;RemoteInspectionTarget.h&quot;
-#import &quot;RemoteInspectorConstants.h&quot;
-#import &lt;Foundation/Foundation.h&gt;
-#import &lt;dispatch/dispatch.h&gt;
-#import &lt;notify.h&gt;
-#import &lt;wtf/Assertions.h&gt;
-#import &lt;wtf/MainThread.h&gt;
-#import &lt;wtf/NeverDestroyed.h&gt;
-#import &lt;wtf/spi/darwin/SandboxSPI.h&gt;
-#import &lt;wtf/spi/darwin/XPCSPI.h&gt;
-#import &lt;wtf/text/WTFString.h&gt;
-
-namespace Inspector {
-
-static bool canAccessWebInspectorMachPort()
-{
-    return sandbox_check(getpid(), &quot;mach-lookup&quot;, static_cast&lt;enum sandbox_filter_type&gt;(SANDBOX_FILTER_GLOBAL_NAME | SANDBOX_CHECK_NO_REPORT), WIRXPCMachPortName) == 0;
-}
-
-static bool globalAutomaticInspectionState()
-{
-    int token = 0;
-    if (notify_register_check(WIRAutomaticInspectionEnabledState, &amp;token) != NOTIFY_STATUS_OK)
-        return false;
-
-    uint64_t automaticInspectionEnabled = 0;
-    notify_get_state(token, &amp;automaticInspectionEnabled);
-    return automaticInspectionEnabled == 1;
-}
-
-bool RemoteInspector::startEnabled = true;
-
-void RemoteInspector::startDisabled()
-{
-    RemoteInspector::startEnabled = false;
-}
-
-RemoteInspector&amp; RemoteInspector::singleton()
-{
-    static NeverDestroyed&lt;RemoteInspector&gt; shared;
-
-    static dispatch_once_t once;
-    dispatch_once(&amp;once, ^{
-        if (canAccessWebInspectorMachPort()) {
-            dispatch_block_t initialize = ^{
-                WTF::initializeMainThread();
-                JSC::initializeThreading();
-                if (RemoteInspector::startEnabled)
-                    shared.get().start();
-            };
-
-            if ([NSThread isMainThread])
-                initialize();
-            else {
-                // FIXME: This means that we may miss an auto-attach to a JSContext created on a non-main thread.
-                // The main thread initialization is required for certain WTF values that need to be initialized
-                // on the &quot;real&quot; main thread. We should investigate a better way to handle this.
-                dispatch_async(dispatch_get_main_queue(), initialize);
-            }
-        }
-    });
-
-    return shared;
-}
-
-RemoteInspector::RemoteInspector()
-    : m_xpcQueue(dispatch_queue_create(&quot;com.apple.JavaScriptCore.remote-inspector-xpc&quot;, DISPATCH_QUEUE_SERIAL))
-{
-}
-
-unsigned RemoteInspector::nextAvailableTargetIdentifier()
-{
-    unsigned nextValidTargetIdentifier;
-    do {
-        nextValidTargetIdentifier = m_nextAvailableTargetIdentifier++;
-    } while (!nextValidTargetIdentifier || nextValidTargetIdentifier == std::numeric_limits&lt;unsigned&gt;::max() || m_targetMap.contains(nextValidTargetIdentifier));
-    return nextValidTargetIdentifier;
-}
-
-void RemoteInspector::registerTarget(RemoteControllableTarget* target)
-{
-    ASSERT_ARG(target, target);
-
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    unsigned targetIdentifier = nextAvailableTargetIdentifier();
-    target-&gt;setTargetIdentifier(targetIdentifier);
-
-    {
-        auto result = m_targetMap.set(targetIdentifier, target);
-        ASSERT_UNUSED(result, result.isNewEntry);
-    }
-
-    // If remote control is not allowed, a null listing is returned.
-    if (RetainPtr&lt;NSDictionary&gt; targetListing = listingForTarget(*target)) {
-        auto result = m_targetListingMap.set(targetIdentifier, targetListing);
-        ASSERT_UNUSED(result, result.isNewEntry);
-    }
-
-    pushListingsSoon();
-}
-
-void RemoteInspector::unregisterTarget(RemoteControllableTarget* target)
-{
-    ASSERT_ARG(target, target);
-
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    unsigned targetIdentifier = target-&gt;targetIdentifier();
-    if (!targetIdentifier)
-        return;
-
-    bool wasRemoved = m_targetMap.remove(targetIdentifier);
-    ASSERT_UNUSED(wasRemoved, wasRemoved);
-
-    // The listing may never have been added if remote control isn't allowed.
-    m_targetListingMap.remove(targetIdentifier);
-
-    if (auto connectionToTarget = m_targetConnectionMap.take(targetIdentifier))
-        connectionToTarget-&gt;targetClosed();
-
-    pushListingsSoon();
-}
-
-void RemoteInspector::updateTarget(RemoteControllableTarget* target)
-{
-    ASSERT_ARG(target, target);
-
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    unsigned targetIdentifier = target-&gt;targetIdentifier();
-    if (!targetIdentifier)
-        return;
-
-    {
-        auto result = m_targetMap.set(targetIdentifier, target);
-        ASSERT_UNUSED(result, !result.isNewEntry);
-    }
-
-    // If the target has just allowed remote control, then the listing won't exist yet.
-    // If the target has no identifier remove the old listing.
-    if (RetainPtr&lt;NSDictionary&gt; targetListing = listingForTarget(*target))
-        m_targetListingMap.set(targetIdentifier, targetListing);
-    else
-        m_targetListingMap.remove(targetIdentifier);
-
-    pushListingsSoon();
-}
-
-void RemoteInspector::updateAutomaticInspectionCandidate(RemoteInspectionTarget* target)
-{
-    ASSERT_ARG(target, target);
-    {
-        std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-        unsigned targetIdentifier = target-&gt;targetIdentifier();
-        if (!targetIdentifier)
-            return;
-
-        auto result = m_targetMap.set(targetIdentifier, target);
-        ASSERT_UNUSED(result, !result.isNewEntry);
-
-        // If the target has just allowed remote control, then the listing won't exist yet.
-        // If the target has no identifier remove the old listing.
-        if (RetainPtr&lt;NSDictionary&gt; targetListing = listingForTarget(*target))
-            m_targetListingMap.set(targetIdentifier, targetListing);
-        else
-            m_targetListingMap.remove(targetIdentifier);
-
-        // Don't allow automatic inspection unless it is allowed or we are stopped.
-        if (!m_automaticInspectionEnabled || !m_enabled) {
-            pushListingsSoon();
-            return;
-        }
-
-        // FIXME: We should handle multiple debuggables trying to pause at the same time on different threads.
-        // To make this work we will need to change m_automaticInspectionCandidateTargetIdentifier to be a per-thread value.
-        // Multiple attempts on the same thread should not be possible because our nested run loop is in a special RWI mode.
-        if (m_automaticInspectionPaused) {
-            LOG_ERROR(&quot;Skipping Automatic Inspection Candidate with pageId(%u) because we are already paused waiting for pageId(%u)&quot;, targetIdentifier, m_automaticInspectionCandidateTargetIdentifier);
-            pushListingsSoon();
-            return;
-        }
-
-        m_automaticInspectionPaused = true;
-        m_automaticInspectionCandidateTargetIdentifier = targetIdentifier;
-
-        // If we are pausing before we have connected to webinspectord the candidate message will be sent as soon as the connection is established.
-        if (m_relayConnection) {
-            pushListingsNow();
-            sendAutomaticInspectionCandidateMessage();
-        }
-
-        // In case debuggers fail to respond, or we cannot connect to webinspectord, automatically continue after a short period of time.
-#if PLATFORM(WATCHOS)
-        int64_t debuggerTimeoutDelay = 5;
-#else
-        int64_t debuggerTimeoutDelay = 1;
-#endif
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, debuggerTimeoutDelay * NSEC_PER_SEC), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            std::lock_guard&lt;Lock&gt; lock(m_mutex);
-            if (m_automaticInspectionCandidateTargetIdentifier == targetIdentifier) {
-                LOG_ERROR(&quot;Skipping Automatic Inspection Candidate with pageId(%u) because we failed to receive a response in time.&quot;, m_automaticInspectionCandidateTargetIdentifier);
-                m_automaticInspectionPaused = false;
-            }
-        });
-    }
-
-    target-&gt;pauseWaitingForAutomaticInspection();
-
-    {
-        std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-        ASSERT(m_automaticInspectionCandidateTargetIdentifier);
-        m_automaticInspectionCandidateTargetIdentifier = 0;
-    }
-}
-
-void RemoteInspector::updateClientCapabilities()
-{
-    ASSERT(isMainThread());
-
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if (!m_client)
-        m_clientCapabilities = std::nullopt;
-    else {
-        RemoteInspector::Client::Capabilities updatedCapabilities = {
-            m_client-&gt;remoteAutomationAllowed() // remoteAutomationAllowed
-        };
-
-        m_clientCapabilities = updatedCapabilities;
-    }
-}
-
-void RemoteInspector::setRemoteInspectorClient(RemoteInspector::Client* client)
-{
-    ASSERT_ARG(client, client);
-    ASSERT(!m_client);
-
-    {
-        std::lock_guard&lt;Lock&gt; lock(m_mutex);
-        m_client = client;
-    }
-
-    // Send an updated listing that includes whether the client allows remote automation.
-    updateClientCapabilities();
-    pushListingsSoon();
-}
-
-void RemoteInspector::sendAutomaticInspectionCandidateMessage()
-{
-    ASSERT(m_enabled);
-    ASSERT(m_automaticInspectionEnabled);
-    ASSERT(m_automaticInspectionPaused);
-    ASSERT(m_automaticInspectionCandidateTargetIdentifier);
-    ASSERT(m_relayConnection);
-
-    NSDictionary *details = @{WIRTargetIdentifierKey: @(m_automaticInspectionCandidateTargetIdentifier)};
-    m_relayConnection-&gt;sendMessage(WIRAutomaticInspectionCandidateMessage, details);
-}
-
-void RemoteInspector::sendMessageToRemote(unsigned targetIdentifier, const String&amp; message)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if (!m_relayConnection)
-        return;
-
-    auto targetConnection = m_targetConnectionMap.get(targetIdentifier);
-    if (!targetConnection)
-        return;
-
-    NSDictionary *userInfo = @{
-        WIRRawDataKey: [static_cast&lt;NSString *&gt;(message) dataUsingEncoding:NSUTF8StringEncoding],
-        WIRConnectionIdentifierKey: targetConnection-&gt;connectionIdentifier(),
-        WIRDestinationKey: targetConnection-&gt;destination()
-    };
-
-    m_relayConnection-&gt;sendMessage(WIRRawDataMessage, userInfo);
-}
-
-void RemoteInspector::setupFailed(unsigned targetIdentifier)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    m_targetConnectionMap.remove(targetIdentifier);
-
-    if (targetIdentifier == m_automaticInspectionCandidateTargetIdentifier)
-        m_automaticInspectionPaused = false;
-
-    updateHasActiveDebugSession();
-    updateTargetListing(targetIdentifier);
-    pushListingsSoon();
-}
-
-void RemoteInspector::setupCompleted(unsigned targetIdentifier)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if (targetIdentifier == m_automaticInspectionCandidateTargetIdentifier)
-        m_automaticInspectionPaused = false;
-}
-
-bool RemoteInspector::waitingForAutomaticInspection(unsigned)
-{
-    // We don't take the lock to check this because we assume it will be checked repeatedly.
-    return m_automaticInspectionPaused;
-}
-
-void RemoteInspector::clientCapabilitiesDidChange()
-{
-    updateClientCapabilities();
-    pushListingsSoon();
-}
-
-void RemoteInspector::start()
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if (m_enabled)
-        return;
-
-    m_enabled = true;
-
-    // Load the initial automatic inspection state when first started, so we know it before we have even connected to webinspectord.
-    static dispatch_once_t once;
-    dispatch_once(&amp;once, ^{
-        m_automaticInspectionEnabled = globalAutomaticInspectionState();
-    });
-
-    notify_register_dispatch(WIRServiceAvailableNotification, &amp;m_notifyToken, m_xpcQueue, ^(int) {
-        RemoteInspector::singleton().setupXPCConnectionIfNeeded();
-    });
-
-    notify_post(WIRServiceAvailabilityCheckNotification);
-}
-
-void RemoteInspector::stop()
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    stopInternal(StopSource::API);
-}
-
-void RemoteInspector::stopInternal(StopSource source)
-{
-    if (!m_enabled)
-        return;
-
-    m_enabled = false;
-
-    m_pushScheduled = false;
-
-    for (auto targetConnection : m_targetConnectionMap.values())
-        targetConnection-&gt;close();
-    m_targetConnectionMap.clear();
-
-    updateHasActiveDebugSession();
-
-    m_automaticInspectionPaused = false;
-
-    if (m_relayConnection) {
-        switch (source) {
-        case StopSource::API:
-            m_relayConnection-&gt;close();
-            break;
-        case StopSource::XPCMessage:
-            m_relayConnection-&gt;closeFromMessage();
-            break;
-        }
-
-        m_relayConnection = nullptr;
-    }
-
-    notify_cancel(m_notifyToken);
-}
-
-void RemoteInspector::setupXPCConnectionIfNeeded()
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if (m_relayConnection)
-        return;
-
-    xpc_connection_t connection = xpc_connection_create_mach_service(WIRXPCMachPortName, m_xpcQueue, 0);
-    if (!connection)
-        return;
-
-    m_relayConnection = adoptRef(new RemoteInspectorXPCConnection(connection, m_xpcQueue, this));
-    m_relayConnection-&gt;sendMessage(@&quot;syn&quot;, nil); // Send a simple message to initialize the XPC connection.
-    xpc_release(connection);
-
-    if (m_automaticInspectionCandidateTargetIdentifier) {
-        // We already have a debuggable waiting to be automatically inspected.
-        pushListingsNow();
-        sendAutomaticInspectionCandidateMessage();
-    } else
-        pushListingsSoon();
-}
-
-#pragma mark - Proxy Application Information
-
-void RemoteInspector::setParentProcessInformation(pid_t pid, RetainPtr&lt;CFDataRef&gt; auditData)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if (m_parentProcessIdentifier || m_parentProcessAuditData)
-        return;
-
-    m_parentProcessIdentifier = pid;
-    m_parentProcessAuditData = auditData;
-
-    if (m_shouldSendParentProcessInformation)
-        receivedProxyApplicationSetupMessage(nil);
-}
-
-#pragma mark - RemoteInspectorXPCConnection::Client
-
-void RemoteInspector::xpcConnectionReceivedMessage(RemoteInspectorXPCConnection*, NSString *messageName, NSDictionary *userInfo)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    if ([messageName isEqualToString:WIRPermissionDenied]) {
-        stopInternal(StopSource::XPCMessage);
-        return;
-    }
-
-    if ([messageName isEqualToString:WIRSocketDataMessage])
-        receivedDataMessage(userInfo);
-    else if ([messageName isEqualToString:WIRSocketSetupMessage])
-        receivedSetupMessage(userInfo);
-    else if ([messageName isEqualToString:WIRWebPageCloseMessage])
-        receivedDidCloseMessage(userInfo);
-    else if ([messageName isEqualToString:WIRApplicationGetListingMessage])
-        receivedGetListingMessage(userInfo);
-    else if ([messageName isEqualToString:WIRIndicateMessage])
-        receivedIndicateMessage(userInfo);
-    else if ([messageName isEqualToString:WIRProxyApplicationSetupMessage])
-        receivedProxyApplicationSetupMessage(userInfo);
-    else if ([messageName isEqualToString:WIRConnectionDiedMessage])
-        receivedConnectionDiedMessage(userInfo);
-    else if ([messageName isEqualToString:WIRAutomaticInspectionConfigurationMessage])
-        receivedAutomaticInspectionConfigurationMessage(userInfo);
-    else if ([messageName isEqualToString:WIRAutomaticInspectionRejectMessage])
-        receivedAutomaticInspectionRejectMessage(userInfo);
-    else if ([messageName isEqualToString:WIRAutomationSessionRequestMessage])
-        receivedAutomationSessionRequestMessage(userInfo);
-    else
-        NSLog(@&quot;Unrecognized RemoteInspector XPC Message: %@&quot;, messageName);
-}
-
-void RemoteInspector::xpcConnectionFailed(RemoteInspectorXPCConnection* relayConnection)
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-    ASSERT(relayConnection == m_relayConnection);
-    if (relayConnection != m_relayConnection)
-        return;
-
-    m_pushScheduled = false;
-
-    for (auto targetConnection : m_targetConnectionMap.values())
-        targetConnection-&gt;close();
-    m_targetConnectionMap.clear();
-
-    updateHasActiveDebugSession();
-
-    m_automaticInspectionPaused = false;
-
-    // The XPC connection will close itself.
-    m_relayConnection = nullptr;
-}
-
-void RemoteInspector::xpcConnectionUnhandledMessage(RemoteInspectorXPCConnection*, xpc_object_t)
-{
-    // Intentionally ignored.
-}
-
-#pragma mark - Listings
-
-RetainPtr&lt;NSDictionary&gt; RemoteInspector::listingForTarget(const RemoteControllableTarget&amp; target) const
-{
-    if (is&lt;RemoteInspectionTarget&gt;(target))
-        return listingForInspectionTarget(downcast&lt;RemoteInspectionTarget&gt;(target));
-    if (is&lt;RemoteAutomationTarget&gt;(target))
-        return listingForAutomationTarget(downcast&lt;RemoteAutomationTarget&gt;(target));
-
-    ASSERT_NOT_REACHED();
-    return nil;
-}
-
-RetainPtr&lt;NSDictionary&gt; RemoteInspector::listingForInspectionTarget(const RemoteInspectionTarget&amp; target) const
-{
-    // Must collect target information on the WebThread, Main, or Worker thread since RemoteTargets are
-    // implemented by non-threadsafe JSC / WebCore classes such as JSGlobalObject or WebCore::Page.
-
-    if (!target.remoteDebuggingAllowed())
-        return nil;
-
-    RetainPtr&lt;NSMutableDictionary&gt; listing = adoptNS([[NSMutableDictionary alloc] init]);
-    [listing setObject:@(target.targetIdentifier()) forKey:WIRTargetIdentifierKey];
-
-    switch (target.type()) {
-    case RemoteInspectionTarget::Type::JavaScript:
-        [listing setObject:target.name() forKey:WIRTitleKey];
-        [listing setObject:WIRTypeJavaScript forKey:WIRTypeKey];
-        break;
-    case RemoteInspectionTarget::Type::Web:
-        [listing setObject:target.url() forKey:WIRURLKey];
-        [listing setObject:target.name() forKey:WIRTitleKey];
-        [listing setObject:WIRTypeWeb forKey:WIRTypeKey];
-        break;
-    default:
-        ASSERT_NOT_REACHED();
-        break;
-    }
-
-    if (auto* connectionToTarget = m_targetConnectionMap.get(target.targetIdentifier()))
-        [listing setObject:connectionToTarget-&gt;connectionIdentifier() forKey:WIRConnectionIdentifierKey];
-
-    if (target.hasLocalDebugger())
-        [listing setObject:@YES forKey:WIRHasLocalDebuggerKey];
-
-    return listing;
-}
-
-RetainPtr&lt;NSDictionary&gt; RemoteInspector::listingForAutomationTarget(const RemoteAutomationTarget&amp; target) const
-{
-    // Must collect target information on the WebThread or Main thread since RemoteTargets are
-    // implemented by non-threadsafe JSC / WebCore classes such as JSGlobalObject or WebCore::Page.
-    ASSERT(isMainThread());
-
-    RetainPtr&lt;NSMutableDictionary&gt; listing = adoptNS([[NSMutableDictionary alloc] init]);
-    [listing setObject:@(target.targetIdentifier()) forKey:WIRTargetIdentifierKey];
-    [listing setObject:target.name() forKey:WIRSessionIdentifierKey];
-    [listing setObject:WIRTypeAutomation forKey:WIRTypeKey];
-    [listing setObject:@(target.isPaired()) forKey:WIRAutomationTargetIsPairedKey];
-
-    if (auto connectionToTarget = m_targetConnectionMap.get(target.targetIdentifier()))
-        [listing setObject:connectionToTarget-&gt;connectionIdentifier() forKey:WIRConnectionIdentifierKey];
-
-    return listing;
-}
-
-void RemoteInspector::pushListingsNow()
-{
-    ASSERT(m_relayConnection);
-    if (!m_relayConnection)
-        return;
-
-    m_pushScheduled = false;
-
-    RetainPtr&lt;NSMutableDictionary&gt; listings = adoptNS([[NSMutableDictionary alloc] init]);
-    for (RetainPtr&lt;NSDictionary&gt; listing : m_targetListingMap.values()) {
-        NSString *targetIdentifierString = [[listing.get() objectForKey:WIRTargetIdentifierKey] stringValue];
-        [listings setObject:listing.get() forKey:targetIdentifierString];
-    }
-
-    RetainPtr&lt;NSMutableDictionary&gt; message = adoptNS([[NSMutableDictionary alloc] init]);
-    [message setObject:listings.get() forKey:WIRListingKey];
-
-    BOOL isAllowed = m_clientCapabilities &amp;&amp; m_clientCapabilities-&gt;remoteAutomationAllowed;
-    [message setObject:@(isAllowed) forKey:WIRRemoteAutomationEnabledKey];
-
-    m_relayConnection-&gt;sendMessage(WIRListingMessage, message.get());
-}
-
-void RemoteInspector::pushListingsSoon()
-{
-    if (!m_relayConnection)
-        return;
-
-    if (m_pushScheduled)
-        return;
-
-    m_pushScheduled = true;
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        std::lock_guard&lt;Lock&gt; lock(m_mutex);
-        if (m_pushScheduled)
-            pushListingsNow();
-    });
-}
-
-#pragma mark - Update Listing with lock
-
-void RemoteInspector::updateTargetListing(unsigned targetIdentifier)
-{
-    auto target = m_targetMap.get(targetIdentifier);
-    if (!target)
-        return;
-
-    updateTargetListing(*target);
-}
-
-void RemoteInspector::updateTargetListing(const RemoteControllableTarget&amp; target)
-{
-    RetainPtr&lt;NSDictionary&gt; targetListing = listingForTarget(target);
-    if (!targetListing)
-        return;
-
-    m_targetListingMap.set(target.targetIdentifier(), targetListing);
-}
-
-#pragma mark - Active Debugger Sessions
-
-void RemoteInspector::updateHasActiveDebugSession()
-{
-    bool hasActiveDebuggerSession = !m_targetConnectionMap.isEmpty();
-    if (hasActiveDebuggerSession == m_hasActiveDebugSession)
-        return;
-
-    m_hasActiveDebugSession = hasActiveDebuggerSession;
-
-    // FIXME: Expose some way to access this state in an embedder.
-    // Legacy iOS WebKit 1 had a notification. This will need to be smarter with WebKit2.
-}
-
-#pragma mark - Received XPC Messages
-
-void RemoteInspector::receivedSetupMessage(NSDictionary *userInfo)
-{
-    unsigned targetIdentifier = [[userInfo objectForKey:WIRTargetIdentifierKey] unsignedIntegerValue];
-    if (!targetIdentifier)
-        return;
-
-    NSString *connectionIdentifier = [userInfo objectForKey:WIRConnectionIdentifierKey];
-    if (!connectionIdentifier)
-        return;
-
-    NSString *sender = [userInfo objectForKey:WIRSenderKey];
-    if (!sender)
-        return;
-
-    if (m_targetConnectionMap.contains(targetIdentifier))
-        return;
-
-    auto findResult = m_targetMap.find(targetIdentifier);
-    if (findResult == m_targetMap.end())
-        return;
-
-    // Attempt to create a connection. This may fail if the page already has an inspector or if it disallows inspection.
-    RemoteControllableTarget* target = findResult-&gt;value;
-    auto connectionToTarget = adoptRef(*new RemoteConnectionToTarget(target, connectionIdentifier, sender));
-
-    if (is&lt;RemoteInspectionTarget&gt;(target)) {
-        bool isAutomaticInspection = m_automaticInspectionCandidateTargetIdentifier == target-&gt;targetIdentifier();
-        bool automaticallyPause = [[userInfo objectForKey:WIRAutomaticallyPause] boolValue];
-
-        if (!connectionToTarget-&gt;setup(isAutomaticInspection, automaticallyPause)) {
-            connectionToTarget-&gt;close();
-            return;
-        }
-        m_targetConnectionMap.set(targetIdentifier, WTFMove(connectionToTarget));
-    } else if (is&lt;RemoteAutomationTarget&gt;(target)) {
-        if (!connectionToTarget-&gt;setup()) {
-            connectionToTarget-&gt;close();
-            return;
-        }
-        m_targetConnectionMap.set(targetIdentifier, WTFMove(connectionToTarget));
-    } else
-        ASSERT_NOT_REACHED();
-
-    updateHasActiveDebugSession();
-    updateTargetListing(*target);
-    pushListingsSoon();
-}
-
-void RemoteInspector::receivedDataMessage(NSDictionary *userInfo)
-{
-    unsigned targetIdentifier = [[userInfo objectForKey:WIRTargetIdentifierKey] unsignedIntegerValue];
-    if (!targetIdentifier)
-        return;
-
-    auto connectionToTarget = m_targetConnectionMap.get(targetIdentifier);
-    if (!connectionToTarget)
-        return;
-
-    NSData *data = [userInfo objectForKey:WIRSocketDataKey];
-    RetainPtr&lt;NSString&gt; message = adoptNS([[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
-    connectionToTarget-&gt;sendMessageToTarget(message.get());
-}
-
-void RemoteInspector::receivedDidCloseMessage(NSDictionary *userInfo)
-{
-    unsigned targetIdentifier = [[userInfo objectForKey:WIRTargetIdentifierKey] unsignedIntegerValue];
-    if (!targetIdentifier)
-        return;
-
-    NSString *connectionIdentifier = [userInfo objectForKey:WIRConnectionIdentifierKey];
-    if (!connectionIdentifier)
-        return;
-
-    auto connectionToTarget = m_targetConnectionMap.get(targetIdentifier);
-    if (!connectionToTarget)
-        return;
-
-    if (![connectionIdentifier isEqualToString:connectionToTarget-&gt;connectionIdentifier()])
-        return;
-
-    connectionToTarget-&gt;close();
-    m_targetConnectionMap.remove(targetIdentifier);
-
-    updateHasActiveDebugSession();
-    updateTargetListing(targetIdentifier);
-    pushListingsSoon();
-}
-
-void RemoteInspector::receivedGetListingMessage(NSDictionary *)
-{
-    pushListingsNow();
-}
-
-void RemoteInspector::receivedIndicateMessage(NSDictionary *userInfo)
-{
-    unsigned identifier = [[userInfo objectForKey:WIRTargetIdentifierKey] unsignedIntegerValue];
-    if (!identifier)
-        return;
-
-    BOOL indicateEnabled = [[userInfo objectForKey:WIRIndicateEnabledKey] boolValue];
-
-    callOnWebThreadOrDispatchAsyncOnMainThread(^{
-        RemoteControllableTarget* target = nullptr;
-        {
-            std::lock_guard&lt;Lock&gt; lock(m_mutex);
-
-            auto findResult = m_targetMap.find(identifier);
-            if (findResult == m_targetMap.end())
-                return;
-
-            target = findResult-&gt;value;
-        }
-        if (is&lt;RemoteInspectionTarget&gt;(target))
-            downcast&lt;RemoteInspectionTarget&gt;(target)-&gt;setIndicating(indicateEnabled);
-    });
-}
-
-void RemoteInspector::receivedProxyApplicationSetupMessage(NSDictionary *)
-{
-    ASSERT(m_relayConnection);
-    if (!m_relayConnection)
-        return;
-
-    if (!m_parentProcessIdentifier || !m_parentProcessAuditData) {
-        // We are a proxy application without parent process information.
-        // Wait a bit for the information, but give up after a second.
-        m_shouldSendParentProcessInformation = true;
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            std::lock_guard&lt;Lock&gt; lock(m_mutex);
-            if (m_shouldSendParentProcessInformation)
-                stopInternal(StopSource::XPCMessage);
-        });
-        return;
-    }
-
-    m_shouldSendParentProcessInformation = false;
-
-    m_relayConnection-&gt;sendMessage(WIRProxyApplicationSetupResponseMessage, @{
-        WIRProxyApplicationParentPIDKey: @(m_parentProcessIdentifier),
-        WIRProxyApplicationParentAuditDataKey: (NSData *)m_parentProcessAuditData.get(),
-    });
-}
-
-void RemoteInspector::receivedConnectionDiedMessage(NSDictionary *userInfo)
-{
-    NSString *connectionIdentifier = [userInfo objectForKey:WIRConnectionIdentifierKey];
-    if (!connectionIdentifier)
-        return;
-
-    auto it = m_targetConnectionMap.begin();
-    auto end = m_targetConnectionMap.end();
-    for (; it != end; ++it) {
-        if ([connectionIdentifier isEqualToString:it-&gt;value-&gt;connectionIdentifier()])
-            break;
-    }
-
-    if (it == end)
-        return;
-
-    auto connection = it-&gt;value;
-    unsigned targetIdentifier = connection-&gt;targetIdentifier().value_or(0);
-    connection-&gt;close();
-    m_targetConnectionMap.remove(it);
-
-    updateHasActiveDebugSession();
-    updateTargetListing(targetIdentifier);
-    pushListingsSoon();
-}
-
-void RemoteInspector::receivedAutomaticInspectionConfigurationMessage(NSDictionary *userInfo)
-{
-    m_automaticInspectionEnabled = [[userInfo objectForKey:WIRAutomaticInspectionEnabledKey] boolValue];
-
-    if (!m_automaticInspectionEnabled &amp;&amp; m_automaticInspectionPaused)
-        m_automaticInspectionPaused = false;
-}
-
-void RemoteInspector::receivedAutomaticInspectionRejectMessage(NSDictionary *userInfo)
-{
-    unsigned rejectionIdentifier = [[userInfo objectForKey:WIRTargetIdentifierKey] unsignedIntValue];
-
-    ASSERT(rejectionIdentifier == m_automaticInspectionCandidateTargetIdentifier);
-    if (rejectionIdentifier == m_automaticInspectionCandidateTargetIdentifier)
-        m_automaticInspectionPaused = false;
-}
-
-void RemoteInspector::receivedAutomationSessionRequestMessage(NSDictionary *userInfo)
-{
-    if (!m_client)
-        return;
-
-    if (!m_clientCapabilities || !m_clientCapabilities-&gt;remoteAutomationAllowed)
-        return;
-
-    NSString *suggestedSessionIdentifier = [userInfo objectForKey:WIRSessionIdentifierKey];
-    if (!suggestedSessionIdentifier)
-        return;
-
-    m_client-&gt;requestAutomationSession(suggestedSessionIdentifier);
-}
-
-} // namespace Inspector
-
-#endif // ENABLE(REMOTE_INSPECTOR)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorXPCConnectionh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1,77 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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.
- */
-
-#pragma once
-
-#if ENABLE(REMOTE_INSPECTOR)
-
-#import &lt;dispatch/dispatch.h&gt;
-#import &lt;wtf/Lock.h&gt;
-#import &lt;wtf/ThreadSafeRefCounted.h&gt;
-#import &lt;wtf/spi/darwin/XPCSPI.h&gt;
-
-OBJC_CLASS NSDictionary;
-OBJC_CLASS NSString;
-
-namespace Inspector {
-
-class RemoteInspectorXPCConnection : public ThreadSafeRefCounted&lt;RemoteInspectorXPCConnection&gt; {
-public:
-    class Client {
-    public:
-        virtual ~Client() { }
-        virtual void xpcConnectionReceivedMessage(RemoteInspectorXPCConnection*, NSString *messageName, NSDictionary *userInfo) = 0;
-        virtual void xpcConnectionFailed(RemoteInspectorXPCConnection*) = 0;
-        virtual void xpcConnectionUnhandledMessage(RemoteInspectorXPCConnection*, xpc_object_t) = 0;
-    };
-
-    RemoteInspectorXPCConnection(xpc_connection_t, dispatch_queue_t, Client*);
-    virtual ~RemoteInspectorXPCConnection();
-
-    void close();
-    void closeFromMessage();
-    void sendMessage(NSString *messageName, NSDictionary *userInfo);
-
-private:
-    NSDictionary *deserializeMessage(xpc_object_t);
-    void handleEvent(xpc_object_t);
-    void closeOnQueue();
-
-    // We handle XPC events on the queue, but a client may call close() on any queue.
-    // We make sure that m_client is thread safe and immediately cleared in close().
-    Lock m_mutex;
-
-    xpc_connection_t m_connection;
-    dispatch_queue_t m_queue;
-    Client* m_client;
-    bool m_closed { false };
-#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200)
-    bool m_validated { false };
-#endif
-};
-
-} // namespace Inspector
-
-#endif // ENABLE(REMOTE_INSPECTOR)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremoteRemoteInspectorXPCConnectionmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1,222 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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.
- */
-
-#import &quot;config.h&quot;
-#import &quot;RemoteInspectorXPCConnection.h&quot;
-
-#if ENABLE(REMOTE_INSPECTOR)
-
-#import &lt;Foundation/Foundation.h&gt;
-#import &lt;mutex&gt;
-#import &lt;wtf/Assertions.h&gt;
-#import &lt;wtf/Lock.h&gt;
-#import &lt;wtf/Ref.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-#import &lt;wtf/spi/cocoa/SecuritySPI.h&gt;
-#import &lt;wtf/spi/darwin/XPCSPI.h&gt;
-
-#if USE(APPLE_INTERNAL_SDK)
-#import &lt;CoreFoundation/CFXPCBridge.h&gt;
-#else
-extern &quot;C&quot; {
-    xpc_object_t _CFXPCCreateXPCMessageWithCFObject(CFTypeRef);
-    CFTypeRef _CFXPCCreateCFObjectFromXPCMessage(xpc_object_t);
-}
-#endif
-
-#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200)
-static bool auditTokenHasEntitlement(audit_token_t token, NSString *entitlement)
-{
-    auto task = adoptCF(SecTaskCreateWithAuditToken(kCFAllocatorDefault, token));
-    if (!task)
-        return false;
-
-    auto value = adoptCF(SecTaskCopyValueForEntitlement(task.get(), (CFStringRef)entitlement, nullptr));
-    if (!value)
-        return false;
-
-    if (CFGetTypeID(value.get()) != CFBooleanGetTypeID())
-        return false;
-
-    return CFBooleanGetValue(static_cast&lt;CFBooleanRef&gt;(value.get()));
-}
-#endif
-
-namespace Inspector {
-
-// Constants private to this file for message serialization on both ends.
-#define RemoteInspectorXPCConnectionMessageNameKey @&quot;messageName&quot;
-#define RemoteInspectorXPCConnectionUserInfoKey @&quot;userInfo&quot;
-#define RemoteInspectorXPCConnectionSerializedMessageKey &quot;msgData&quot;
-
-RemoteInspectorXPCConnection::RemoteInspectorXPCConnection(xpc_connection_t connection, dispatch_queue_t queue, Client* client)
-    : m_connection(connection)
-    , m_queue(queue)
-    , m_client(client)
-{
-    dispatch_retain(m_queue);
-
-    xpc_retain(m_connection);
-    xpc_connection_set_target_queue(m_connection, m_queue);
-    xpc_connection_set_event_handler(m_connection, ^(xpc_object_t object) {
-        handleEvent(object);
-    });
-
-    // Balanced by deref when the xpc_connection receives XPC_ERROR_CONNECTION_INVALID.
-    ref();
-
-    xpc_connection_resume(m_connection);
-}
-
-RemoteInspectorXPCConnection::~RemoteInspectorXPCConnection()
-{
-    ASSERT(!m_client);
-    ASSERT(!m_connection);
-    ASSERT(m_closed);
-}
-
-void RemoteInspectorXPCConnection::close()
-{
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-    closeFromMessage();
-}
-
-void RemoteInspectorXPCConnection::closeFromMessage()
-{
-    m_closed = true;
-    m_client = nullptr;
-
-    dispatch_async(m_queue, ^{
-        std::lock_guard&lt;Lock&gt; lock(m_mutex);
-        // This will trigger one last XPC_ERROR_CONNECTION_INVALID event on the queue and deref us.
-        closeOnQueue();
-    });
-}
-
-void RemoteInspectorXPCConnection::closeOnQueue()
-{
-    if (m_connection) {
-        xpc_connection_cancel(m_connection);
-        xpc_release(m_connection);
-        m_connection = nullptr;
-    }
-
-    if (m_queue) {
-        dispatch_release(m_queue);
-        m_queue = nullptr;
-    }
-}
-
-NSDictionary *RemoteInspectorXPCConnection::deserializeMessage(xpc_object_t object)
-{
-    if (xpc_get_type(object) != XPC_TYPE_DICTIONARY)
-        return nil;
-
-    xpc_object_t xpcDictionary = xpc_dictionary_get_value(object, RemoteInspectorXPCConnectionSerializedMessageKey);
-    if (!xpcDictionary || xpc_get_type(xpcDictionary) != XPC_TYPE_DICTIONARY) {
-        std::lock_guard&lt;Lock&gt; lock(m_mutex);
-        if (m_client)
-            m_client-&gt;xpcConnectionUnhandledMessage(this, object);
-        return nil;
-    }
-
-    RetainPtr&lt;CFDictionaryRef&gt; dictionary = adoptCF((CFDictionaryRef)_CFXPCCreateCFObjectFromXPCMessage(xpcDictionary));
-    ASSERT_WITH_MESSAGE(dictionary, &quot;Unable to deserialize xpc message&quot;);
-    return (NSDictionary *)dictionary.autorelease();
-}
-
-void RemoteInspectorXPCConnection::handleEvent(xpc_object_t object)
-{
-    if (xpc_get_type(object) == XPC_TYPE_ERROR) {
-        {
-            std::lock_guard&lt;Lock&gt; lock(m_mutex);
-            if (m_client)
-                m_client-&gt;xpcConnectionFailed(this);
-
-            m_closed = true;
-            m_client = nullptr;
-            closeOnQueue();
-        }
-
-        if (object == XPC_ERROR_CONNECTION_INVALID) {
-            // This is the last event we will ever receive from the connection.
-            // This balances the ref() in the constructor.
-            deref();
-        }
-        return;
-    }
-
-#if (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101200)
-    if (!m_validated) {
-        audit_token_t token;
-        xpc_connection_get_audit_token(m_connection, &amp;token);
-        if (!auditTokenHasEntitlement(token, @&quot;com.apple.private.webinspector.webinspectord&quot;)) {
-            std::lock_guard&lt;Lock&gt; lock(m_mutex);
-            // This will trigger one last XPC_ERROR_CONNECTION_INVALID event on the queue and deref us.
-            closeOnQueue();
-            return;
-        }
-        m_validated = true;
-    }
-#endif
-
-    NSDictionary *dataDictionary = deserializeMessage(object);
-    if (!dataDictionary)
-        return;
-
-    NSString *message = [dataDictionary objectForKey:RemoteInspectorXPCConnectionMessageNameKey];
-    NSDictionary *userInfo = [dataDictionary objectForKey:RemoteInspectorXPCConnectionUserInfoKey];
-    std::lock_guard&lt;Lock&gt; lock(m_mutex);
-    if (m_client)
-        m_client-&gt;xpcConnectionReceivedMessage(this, message, userInfo);
-}
-
-void RemoteInspectorXPCConnection::sendMessage(NSString *messageName, NSDictionary *userInfo)
-{
-    ASSERT(!m_closed);
-    if (m_closed)
-        return;
-
-    NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithObject:messageName forKey:RemoteInspectorXPCConnectionMessageNameKey];
-    if (userInfo)
-        [dictionary setObject:userInfo forKey:RemoteInspectorXPCConnectionUserInfoKey];
-
-    xpc_object_t xpcDictionary = _CFXPCCreateXPCMessageWithCFObject((CFDictionaryRef)dictionary);
-    ASSERT_WITH_MESSAGE(xpcDictionary &amp;&amp; xpc_get_type(xpcDictionary) == XPC_TYPE_DICTIONARY, &quot;Unable to serialize xpc message&quot;);
-    if (!xpcDictionary)
-        return;
-
-    xpc_object_t msg = xpc_dictionary_create(nullptr, nullptr, 0);
-    xpc_dictionary_set_value(msg, RemoteInspectorXPCConnectionSerializedMessageKey, xpcDictionary);
-    xpc_release(xpcDictionary);
-
-    xpc_connection_send_message(m_connection, msg);
-
-    xpc_release(msg);
-}
-
-} // namespace Inspector
-
-#endif // ENABLE(REMOTE_INSPECTOR)
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorremotecocoaRemoteConnectionToTargetCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm (212393 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm        2017-02-15 21:50:10 UTC (rev 212393)
+++ trunk/Source/JavaScriptCore/inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteConnectionToTarget::sendMessageToTarget(const String&amp; message)
</del><ins>+void RemoteConnectionToTarget::sendMessageToTarget(NSString *message)
</ins><span class="cx"> {
</span><span class="cx">     ref();
</span><span class="cx">     dispatchAsyncOnTarget(^{
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/WebKit2/ChangeLog        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-02-15  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Unreviewed, rolling out r212394.
+
+        Fixed iOS WebInspector
+
+        Reverted changeset:
+
+        &quot;Unreviewed, rolling out r212169.&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=166681
+        http://trac.webkit.org/changeset/212394
+
</ins><span class="cx"> 2017-02-15  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [MediaStream] delete CaptureDeviceInfo struct
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (212423 => 212424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2017-02-16 06:14:16 UTC (rev 212423)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2017-02-16 07:40:16 UTC (rev 212424)
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx">     setEnabledServices(parameters.hasImageServices, parameters.hasSelectionServices, parameters.hasRichContentServices);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(REMOTE_INSPECTOR)
</del><ins>+#if ENABLE(REMOTE_INSPECTOR) &amp;&amp; PLATFORM(COCOA)
</ins><span class="cx">     audit_token_t auditToken;
</span><span class="cx">     if (parentProcessConnection()-&gt;getAuditToken(auditToken)) {
</span><span class="cx">         RetainPtr&lt;CFDataRef&gt; auditData = adoptCF(CFDataCreate(nullptr, (const UInt8*)&amp;auditToken, sizeof(auditToken)));
</span></span></pre>
</div>
</div>

</body>
</html>