<!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>[211075] 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/211075">211075</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-23 19:19:03 -0800 (Mon, 23 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Provide a way to trigger a Garbage Collection
https://bugs.webkit.org/show_bug.cgi?id=167345
&lt;rdar://problem/30102853&gt;

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2017-01-23
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/Console.json:
* inspector/protocol/Debugger.json:
* inspector/protocol/Heap.json:
* inspector/protocol/Runtime.json:
These domains are supported by Worker backends. Label them.

* inspector/scripts/codegen/generate_js_backend_commands.py:
(JSBackendCommandsGenerator.generate_domain):
* inspector/scripts/codegen/models.py:
(Protocol.parse_domain):
(Domain.__init__):
(Domains):
Parse &quot;workerSupported&quot; and include a line in BackendCommands.js
that calls to InspectorBackend.workerSupportedDomain().

* inspector/scripts/tests/generic/domain-availability.json: Added.
* inspector/scripts/tests/generic/expected/domain-availability.json-result: Added.
* inspector/scripts/tests/generic/expected/worker-supported-domains.json-result: Added.
* inspector/scripts/tests/generic/worker-supported-domains.json: Added.
Tests for domain &quot;workerSupported&quot; and &quot;availability&quot; properties.

Source/WebCore:

* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
Include a HeapAgent so we can do Heap.gc on Workers.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
New &quot;Garbage collect&quot; tooltip.

* Versions/Inspector-iOS-10.3.json:
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
Update 10.3 so it generates its list of supported domains for workers.
Note that the Heap domain is not be available in this backend but it is now.

* UserInterface/Protocol/Connection.js:
(InspectorBackend.WorkerConnection):
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.garbageCollected):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.get workerSupportedDomains):
(InspectorBackendClass.prototype.workerSupportedDomain):

* UserInterface/Images/NavigationItemClear.svg: Added.
* UserInterface/Images/NavigationItemGarbageCollect.svg: Added.
New image for Garbage Collection. Better image for clearing.

* UserInterface/Images/gtk/NavigationItemClear.svg: Added.
Copy the Trash icon for Clear for gtk.

* UserInterface/Protocol/Target.js:
(WebInspector.Target.prototype.get HeapAgent):
* UserInterface/Protocol/WorkerTarget.js:
(WebInspector.WorkerTarget):
Include Heap agent for Workers.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get navigationItems):
(WebInspector.LogContentView.prototype._garbageCollect):
Add garbage collect button which triggers gc on all capable targets.

* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Update the Clear icon to an improved icon.

* UserInterface/Controllers/HeapManager.js:
(WebInspector.HeapManager.prototype.garbageCollected):
Timelines only shows Main Target events, do not show GC events for Workers.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolConsolejson">trunk/Source/JavaScriptCore/inspector/protocol/Console.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolDebuggerjson">trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolHeapjson">trunk/Source/JavaScriptCore/inspector/protocol/Heap.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolRuntimejson">trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_js_backend_commandspy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegenmodelspy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorWorkerInspectorControllercpp">trunk/Source/WebCore/inspector/WorkerInspectorController.cpp</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersHeapManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/HeapManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolConnectionjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolInspectorBackendjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolLegacy103InspectorBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolTargetjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/Target.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolWorkerTargetjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/WorkerTarget.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordingContentViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIVersionsInspectoriOS103json">trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.3.json</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericdomainavailabilityjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domain-availability.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainavailabilityjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedworkersupporteddomainsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericworkersupporteddomainsjson">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/worker-supported-domains.json</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesNavigationItemClearsvg">trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemClear.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesNavigationItemGarbageCollectsvg">trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemGarbageCollect.svg</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceImagesgtkNavigationItemClearsvg">trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemClear.svg</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2017-01-23  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Provide a way to trigger a Garbage Collection
+        https://bugs.webkit.org/show_bug.cgi?id=167345
+        &lt;rdar://problem/30102853&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/protocol/Console.json:
+        * inspector/protocol/Debugger.json:
+        * inspector/protocol/Heap.json:
+        * inspector/protocol/Runtime.json:
+        These domains are supported by Worker backends. Label them.
+
+        * inspector/scripts/codegen/generate_js_backend_commands.py:
+        (JSBackendCommandsGenerator.generate_domain):
+        * inspector/scripts/codegen/models.py:
+        (Protocol.parse_domain):
+        (Domain.__init__):
+        (Domains):
+        Parse &quot;workerSupported&quot; and include a line in BackendCommands.js
+        that calls to InspectorBackend.workerSupportedDomain().
+
+        * inspector/scripts/tests/generic/domain-availability.json: Added.
+        * inspector/scripts/tests/generic/expected/domain-availability.json-result: Added.
+        * inspector/scripts/tests/generic/expected/worker-supported-domains.json-result: Added.
+        * inspector/scripts/tests/generic/worker-supported-domains.json: Added.
+        Tests for domain &quot;workerSupported&quot; and &quot;availability&quot; properties.
+
</ins><span class="cx"> 2017-01-23  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=167247
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolConsolejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Console.json (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Console.json        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Console.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Console&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the &lt;a href='http://getfirebug.com/wiki/index.php/Console_API'&gt;JavaScript Console API&lt;/a&gt;. One needs to enable this domain using &lt;code&gt;enable&lt;/code&gt; command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using &lt;code&gt;messageAdded&lt;/code&gt; notification upon enabling.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;ConsoleMessage&quot;,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolDebuggerjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Debugger&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;BreakpointId&quot;,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolHeapjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Heap.json (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Heap.json        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Heap.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Heap&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Heap domain exposes JavaScript heap attributes and capabilities.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;GarbageCollection&quot;,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolRuntimejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Runtime&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;RemoteObjectId&quot;,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_js_backend_commandspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -139,4 +139,7 @@
</span><span class="cx">             else:
</span><span class="cx">                 lines.append('InspectorBackend.activateDomain(&quot;%(domain)s&quot;);' % activate_args)
</span><span class="cx"> 
</span><ins>+        if domain.workerSupported:
+            lines.append('InspectorBackend.workerSupportedDomain(&quot;%s&quot;);' % domain.domain_name)
+
</ins><span class="cx">         return &quot;\n&quot;.join(lines)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegenmodelspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -382,8 +382,12 @@
</span><span class="cx">             if json['availability'] not in allowed_activation_strings:
</span><span class="cx">                 raise ParseException('Malformed domain specification: availability is an unsupported string. Was: &quot;%s&quot;, Allowed values: %s' % (json['availability'], ', '.join(allowed_activation_strings)))
</span><span class="cx"> 
</span><del>-        self.domains.append(Domain(json['domain'], json.get('description', ''), json.get('featureGuard'), json.get('availability'), isSupplemental, types, commands, events))
</del><ins>+        if 'workerSupported' in json:
+            if not isinstance(json['workerSupported'], bool):
+                raise ParseException('Malformed domain specification: workerSupported is not a boolean. Was: &quot;%s&quot;' % json['availability'])
</ins><span class="cx"> 
</span><ins>+        self.domains.append(Domain(json['domain'], json.get('description', ''), json.get('featureGuard'), json.get('availability'), json.get('workerSupported', False), isSupplemental, types, commands, events))
+
</ins><span class="cx">     def parse_type_declaration(self, json):
</span><span class="cx">         check_for_required_properties(['id', 'type'], json, &quot;type&quot;)
</span><span class="cx">         log.debug(&quot;parse type %s&quot; % json['id'])
</span><span class="lines">@@ -552,11 +556,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class Domain:
</span><del>-    def __init__(self, domain_name, description, feature_guard, availability, isSupplemental, type_declarations, commands, events):
</del><ins>+    def __init__(self, domain_name, description, feature_guard, availability, workerSupported, isSupplemental, type_declarations, commands, events):
</ins><span class="cx">         self.domain_name = domain_name
</span><span class="cx">         self.description = description
</span><span class="cx">         self.feature_guard = feature_guard
</span><span class="cx">         self.availability = availability
</span><ins>+        self.workerSupported = workerSupported
</ins><span class="cx">         self.is_supplemental = isSupplemental
</span><span class="cx">         self._type_declarations = type_declarations
</span><span class="cx">         self._commands = commands
</span><span class="lines">@@ -586,7 +591,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class Domains:
</span><del>-    GLOBAL = Domain(&quot;&quot;, &quot;The global domain, in which primitive types are implicitly declared.&quot;, None, None, True, [], [], [])
</del><ins>+    GLOBAL = Domain(&quot;&quot;, &quot;The global domain, in which primitive types are implicitly declared.&quot;, None, None, True, False, [], [], [])
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class TypeDeclaration:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericdomainavailabilityjson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domain-availability.json (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domain-availability.json                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/domain-availability.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[
+{
+    &quot;domain&quot;: &quot;DomainA&quot;,
+    &quot;availability&quot;: &quot;web&quot;,
+    &quot;commands&quot;: [{&quot;name&quot;: &quot;enable&quot;}]
+},
+{
+    &quot;domain&quot;: &quot;DomainB&quot;,
+    &quot;commands&quot;: [{&quot;name&quot;: &quot;enable&quot;}]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainavailabilityjsonresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,1085 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// DomainA.
+InspectorBackend.registerCommand(&quot;DomainA.enable&quot;, [], []);
+InspectorBackend.activateDomain(&quot;DomainA&quot;, &quot;web&quot;);
+
+// DomainB.
+InspectorBackend.registerCommand(&quot;DomainB.enable&quot;, [], []);
+InspectorBackend.activateDomain(&quot;DomainB&quot;);
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include &quot;TestProtocolTypes.h&quot;
+#include &lt;inspector/InspectorFrontendRouter.h&gt;
+#include &lt;JavaScriptCore/InspectorBackendDispatcher.h&gt;
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+    void setBackendDispatcher(RefPtr&lt;BackendDispatcher&gt;&amp;&amp; dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+    BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+    RefPtr&lt;BackendDispatcher&gt; m_backendDispatcher;
+};
+
+
+class AlternateDomainABackendDispatcher : public AlternateBackendDispatcher {
+public:
+    virtual ~AlternateDomainABackendDispatcher() { }
+    virtual void enable(long callId) = 0;
+};
+class AlternateDomainBBackendDispatcher : public AlternateBackendDispatcher {
+public:
+    virtual ~AlternateDomainBBackendDispatcher() { }
+    virtual void enable(long callId) = 0;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include &quot;TestProtocolObjects.h&quot;
+#include &lt;inspector/InspectorBackendDispatcher.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+class AlternateDomainABackendDispatcher;
+class AlternateDomainBBackendDispatcher;
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+class DomainABackendDispatcherHandler {
+public:
+    virtual void enable(ErrorString&amp;) = 0;
+protected:
+    virtual ~DomainABackendDispatcherHandler();
+};
+
+class DomainBBackendDispatcherHandler {
+public:
+    virtual void enable(ErrorString&amp;) = 0;
+protected:
+    virtual ~DomainBBackendDispatcherHandler();
+};
+
+class DomainABackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+    static Ref&lt;DomainABackendDispatcher&gt; create(BackendDispatcher&amp;, DomainABackendDispatcherHandler*);
+    void dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message) override;
+private:
+    void enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp; parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+    void setAlternateDispatcher(AlternateDomainABackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+    AlternateDomainABackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+    DomainABackendDispatcher(BackendDispatcher&amp;, DomainABackendDispatcherHandler*);
+    DomainABackendDispatcherHandler* m_agent { nullptr };
+};
+
+class DomainBBackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+    static Ref&lt;DomainBBackendDispatcher&gt; create(BackendDispatcher&amp;, DomainBBackendDispatcherHandler*);
+    void dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message) override;
+private:
+    void enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp; parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+    void setAlternateDispatcher(AlternateDomainBBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+    AlternateDomainBBackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+    DomainBBackendDispatcher(BackendDispatcher&amp;, DomainBBackendDispatcherHandler*);
+    DomainBBackendDispatcherHandler* m_agent { nullptr };
+};
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &quot;config.h&quot;
+#include &quot;TestBackendDispatchers.h&quot;
+
+#include &lt;inspector/InspectorFrontendRouter.h&gt;
+#include &lt;inspector/InspectorValues.h&gt;
+#include &lt;wtf/NeverDestroyed.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include &quot;TestAlternateBackendDispatchers.h&quot;
+#endif
+
+namespace Inspector {
+
+DomainABackendDispatcherHandler::~DomainABackendDispatcherHandler() { }
+DomainBBackendDispatcherHandler::~DomainBBackendDispatcherHandler() { }
+
+Ref&lt;DomainABackendDispatcher&gt; DomainABackendDispatcher::create(BackendDispatcher&amp; backendDispatcher, DomainABackendDispatcherHandler* agent)
+{
+    return adoptRef(*new DomainABackendDispatcher(backendDispatcher, agent));
+}
+
+DomainABackendDispatcher::DomainABackendDispatcher(BackendDispatcher&amp; backendDispatcher, DomainABackendDispatcherHandler* agent)
+    : SupplementalBackendDispatcher(backendDispatcher)
+    , m_agent(agent)
+{
+    m_backendDispatcher-&gt;registerDispatcherForDomain(ASCIILiteral(&quot;DomainA&quot;), this);
+}
+
+void DomainABackendDispatcher::dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message)
+{
+    Ref&lt;DomainABackendDispatcher&gt; protect(*this);
+
+    RefPtr&lt;InspectorObject&gt; parameters;
+    message-&gt;getObject(ASCIILiteral(&quot;params&quot;), parameters);
+
+    if (method == &quot;enable&quot;)
+        enable(requestId, WTFMove(parameters));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', &quot;DomainA&quot;, '.', method, &quot;' was not found&quot;));
+}
+
+void DomainABackendDispatcher::enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp;)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+    if (m_alternateDispatcher) {
+        m_alternateDispatcher-&gt;enable(requestId);
+        return;
+    }
+#endif
+
+    ErrorString error;
+    Ref&lt;InspectorObject&gt; result = InspectorObject::create();
+    m_agent-&gt;enable(error);
+
+    if (!error.length())
+        m_backendDispatcher-&gt;sendResponse(requestId, WTFMove(result));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+Ref&lt;DomainBBackendDispatcher&gt; DomainBBackendDispatcher::create(BackendDispatcher&amp; backendDispatcher, DomainBBackendDispatcherHandler* agent)
+{
+    return adoptRef(*new DomainBBackendDispatcher(backendDispatcher, agent));
+}
+
+DomainBBackendDispatcher::DomainBBackendDispatcher(BackendDispatcher&amp; backendDispatcher, DomainBBackendDispatcherHandler* agent)
+    : SupplementalBackendDispatcher(backendDispatcher)
+    , m_agent(agent)
+{
+    m_backendDispatcher-&gt;registerDispatcherForDomain(ASCIILiteral(&quot;DomainB&quot;), this);
+}
+
+void DomainBBackendDispatcher::dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message)
+{
+    Ref&lt;DomainBBackendDispatcher&gt; protect(*this);
+
+    RefPtr&lt;InspectorObject&gt; parameters;
+    message-&gt;getObject(ASCIILiteral(&quot;params&quot;), parameters);
+
+    if (method == &quot;enable&quot;)
+        enable(requestId, WTFMove(parameters));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', &quot;DomainB&quot;, '.', method, &quot;' was not found&quot;));
+}
+
+void DomainBBackendDispatcher::enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp;)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+    if (m_alternateDispatcher) {
+        m_alternateDispatcher-&gt;enable(requestId);
+        return;
+    }
+#endif
+
+    ErrorString error;
+    Ref&lt;InspectorObject&gt; result = InspectorObject::create();
+    m_agent-&gt;enable(error);
+
+    if (!error.length())
+        m_backendDispatcher-&gt;sendResponse(requestId, WTFMove(result));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include &quot;TestProtocolObjects.h&quot;
+#include &lt;inspector/InspectorValues.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &quot;config.h&quot;
+#include &quot;TestFrontendDispatchers.h&quot;
+
+#include &quot;InspectorFrontendRouter.h&quot;
+#include &lt;wtf/text/CString.h&gt;
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include &lt;inspector/InspectorProtocolTypes.h&gt;
+#include &lt;wtf/Assertions.h&gt;
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+
+
+
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &quot;config.h&quot;
+#include &quot;TestProtocolObjects.h&quot;
+
+#include &lt;wtf/Optional.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &lt;JavaScriptCore/InspectorAlternateBackendDispatchers.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
+@protocol TestProtocolDomainADomainHandler;
+@protocol TestProtocolDomainBDomainHandler;
+
+namespace Inspector {
+
+
+class ObjCInspectorDomainABackendDispatcher final : public AlternateDomainABackendDispatcher {
+public:
+    ObjCInspectorDomainABackendDispatcher(id&lt;TestProtocolDomainADomainHandler&gt; handler) { m_delegate = handler; }
+    virtual void enable(long requestId) override;
+private:
+    RetainPtr&lt;id&lt;TestProtocolDomainADomainHandler&gt;&gt; m_delegate;
+};
+
+class ObjCInspectorDomainBBackendDispatcher final : public AlternateDomainBBackendDispatcher {
+public:
+    ObjCInspectorDomainBBackendDispatcher(id&lt;TestProtocolDomainBDomainHandler&gt; handler) { m_delegate = handler; }
+    virtual void enable(long requestId) override;
+private:
+    RetainPtr&lt;id&lt;TestProtocolDomainBDomainHandler&gt;&gt; m_delegate;
+};
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;config.h&quot;
+#import &quot;TestProtocolBackendDispatchers.h&quot;
+
+#include &quot;TestProtocolInternal.h&quot;
+#include &quot;TestProtocolTypeConversions.h&quot;
+#include &lt;JavaScriptCore/InspectorValues.h&gt;
+
+namespace Inspector {
+
+void ObjCInspectorDomainABackendDispatcher::enable(long requestId)
+{
+    id errorCallback = ^(NSString *error) {
+        backendDispatcher()-&gt;reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+        backendDispatcher()-&gt;sendPendingErrors();
+    };
+
+    id successCallback = ^{
+        backendDispatcher()-&gt;sendResponse(requestId, InspectorObject::create());
+    };
+
+    [m_delegate enableWithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+void ObjCInspectorDomainBBackendDispatcher::enable(long requestId)
+{
+    id errorCallback = ^(NSString *error) {
+        backendDispatcher()-&gt;reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+        backendDispatcher()-&gt;sendPendingErrors();
+    };
+
+    id successCallback = ^{
+        backendDispatcher()-&gt;sendResponse(requestId, InspectorObject::create());
+    };
+
+    [m_delegate enableWithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &lt;WebInspector/TestProtocol.h&gt;
+
+__attribute__((visibility (&quot;default&quot;)))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setDomainAHandler:) id&lt;TestProtocolDomainADomainHandler&gt; domainAHandler;
+@property (nonatomic, retain, setter=setDomainBHandler:) id&lt;TestProtocolDomainBDomainHandler&gt; domainBHandler;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolConfiguration.h&quot;
+
+#import &quot;TestProtocolInternal.h&quot;
+#import &quot;TestProtocolBackendDispatchers.h&quot;
+#import &lt;JavaScriptCore/AlternateDispatchableAgent.h&gt;
+#import &lt;JavaScriptCore/AugmentableInspectorController.h&gt;
+#import &lt;JavaScriptCore/InspectorAlternateBackendDispatchers.h&gt;
+#import &lt;JavaScriptCore/InspectorBackendDispatchers.h&gt;
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+    AugmentableInspectorController* _controller;
+    id&lt;TestProtocolDomainADomainHandler&gt; _domainAHandler;
+    id&lt;TestProtocolDomainBDomainHandler&gt; _domainBHandler;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+    self = [super init];
+    if (!self)
+        return nil;
+    ASSERT(controller);
+    _controller = controller;
+    return self;
+}
+
+- (void)dealloc
+{
+    [_domainAHandler release];
+    [_domainBHandler release];
+    [super dealloc];
+}
+
+- (void)setDomainAHandler:(id&lt;TestProtocolDomainADomainHandler&gt;)handler
+{
+    if (handler == _domainAHandler)
+        return;
+
+    [_domainAHandler release];
+    _domainAHandler = [handler retain];
+
+    auto alternateDispatcher = std::make_unique&lt;ObjCInspectorDomainABackendDispatcher&gt;(handler);
+    auto alternateAgent = std::make_unique&lt;AlternateDispatchableAgent&lt;DomainABackendDispatcher, AlternateDomainABackendDispatcher&gt;&gt;(ASCIILiteral(&quot;DomainA&quot;), *_controller, WTFMove(alternateDispatcher));
+    _controller-&gt;appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id&lt;TestProtocolDomainADomainHandler&gt;)domainAHandler
+{
+    return _domainAHandler;
+}
+
+- (void)setDomainBHandler:(id&lt;TestProtocolDomainBDomainHandler&gt;)handler
+{
+    if (handler == _domainBHandler)
+        return;
+
+    [_domainBHandler release];
+    _domainBHandler = [handler retain];
+
+    auto alternateDispatcher = std::make_unique&lt;ObjCInspectorDomainBBackendDispatcher&gt;(handler);
+    auto alternateAgent = std::make_unique&lt;AlternateDispatchableAgent&lt;DomainBBackendDispatcher, AlternateDomainBBackendDispatcher&gt;&gt;(ASCIILiteral(&quot;DomainB&quot;), *_controller, WTFMove(alternateDispatcher));
+    _controller-&gt;appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id&lt;TestProtocolDomainBDomainHandler&gt;)domainBHandler
+{
+    return _domainBHandler;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolInternal.h&quot;
+
+#import &quot;TestProtocolTypeConversions.h&quot;
+#import &lt;JavaScriptCore/InspectorValues.h&gt;
+
+using namespace Inspector;
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &lt;Foundation/Foundation.h&gt;
+
+#import &lt;WebInspector/RWIProtocolJSONObject.h&gt;
+
+
+
+
+
+
+
+
+@protocol TestProtocolDomainADomainHandler &lt;NSObject&gt;
+@required
+- (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+@protocol TestProtocolDomainBDomainHandler &lt;NSObject&gt;
+@required
+- (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocol.h&quot;
+#import &quot;TestProtocolJSONObjectPrivate.h&quot;
+#import &lt;JavaScriptCore/AugmentableInspectorController.h&gt;
+#import &lt;JavaScriptCore/InspectorValues.h&gt;
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocol.h&quot;
+#import &lt;WebInspector/RWIProtocolArrayConversions.h&gt;
+
+namespace Inspector {
+
+template&lt;typename ObjCEnumType&gt;
+ObjCEnumType fromProtocolString(const String&amp; value);
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolTypeConversions.h&quot;
+
+#import &quot;TestProtocol.h&quot;
+#import &quot;TestProtocolTypeParser.h&quot;
+#import &lt;WebInspector/RWIProtocolJSONObjectPrivate.h&gt;
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from domain-availability.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolInternal.h&quot;
+
+#import &quot;TestProtocolTypeConversions.h&quot;
+#import &lt;WebInspector/RWIProtocolJSONObjectPrivate.h&gt;
+#import &lt;JavaScriptCore/InspectorValues.h&gt;
+#import &lt;wtf/Assertions.h&gt;
+
+using namespace Inspector;
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedworkersupporteddomainsjsonresult"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,1086 @@
</span><ins>+### Begin File: InspectorBackendCommands.js
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+// DomainA.
+InspectorBackend.registerCommand(&quot;DomainA.enable&quot;, [], []);
+InspectorBackend.activateDomain(&quot;DomainA&quot;);
+InspectorBackend.workerSupportedDomain(&quot;DomainA&quot;);
+
+// DomainB.
+InspectorBackend.registerCommand(&quot;DomainB.enable&quot;, [], []);
+InspectorBackend.activateDomain(&quot;DomainB&quot;);
+### End File: InspectorBackendCommands.js
+
+### Begin File: TestAlternateBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+#include &quot;TestProtocolTypes.h&quot;
+#include &lt;inspector/InspectorFrontendRouter.h&gt;
+#include &lt;JavaScriptCore/InspectorBackendDispatcher.h&gt;
+
+namespace Inspector {
+
+class AlternateBackendDispatcher {
+public:
+    void setBackendDispatcher(RefPtr&lt;BackendDispatcher&gt;&amp;&amp; dispatcher) { m_backendDispatcher = WTFMove(dispatcher); }
+    BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
+private:
+    RefPtr&lt;BackendDispatcher&gt; m_backendDispatcher;
+};
+
+
+class AlternateDomainABackendDispatcher : public AlternateBackendDispatcher {
+public:
+    virtual ~AlternateDomainABackendDispatcher() { }
+    virtual void enable(long callId) = 0;
+};
+class AlternateDomainBBackendDispatcher : public AlternateBackendDispatcher {
+public:
+    virtual ~AlternateDomainBBackendDispatcher() { }
+    virtual void enable(long callId) = 0;
+};
+
+} // namespace Inspector
+
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+### End File: TestAlternateBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include &quot;TestProtocolObjects.h&quot;
+#include &lt;inspector/InspectorBackendDispatcher.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace Inspector {
+
+typedef String ErrorString;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+class AlternateDomainABackendDispatcher;
+class AlternateDomainBBackendDispatcher;
+#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+
+class DomainABackendDispatcherHandler {
+public:
+    virtual void enable(ErrorString&amp;) = 0;
+protected:
+    virtual ~DomainABackendDispatcherHandler();
+};
+
+class DomainBBackendDispatcherHandler {
+public:
+    virtual void enable(ErrorString&amp;) = 0;
+protected:
+    virtual ~DomainBBackendDispatcherHandler();
+};
+
+class DomainABackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+    static Ref&lt;DomainABackendDispatcher&gt; create(BackendDispatcher&amp;, DomainABackendDispatcherHandler*);
+    void dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message) override;
+private:
+    void enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp; parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+    void setAlternateDispatcher(AlternateDomainABackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+    AlternateDomainABackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+    DomainABackendDispatcher(BackendDispatcher&amp;, DomainABackendDispatcherHandler*);
+    DomainABackendDispatcherHandler* m_agent { nullptr };
+};
+
+class DomainBBackendDispatcher final : public SupplementalBackendDispatcher {
+public:
+    static Ref&lt;DomainBBackendDispatcher&gt; create(BackendDispatcher&amp;, DomainBBackendDispatcherHandler*);
+    void dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message) override;
+private:
+    void enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp; parameters);
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+public:
+    void setAlternateDispatcher(AlternateDomainBBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
+private:
+    AlternateDomainBBackendDispatcher* m_alternateDispatcher { nullptr };
+#endif
+private:
+    DomainBBackendDispatcher(BackendDispatcher&amp;, DomainBBackendDispatcherHandler*);
+    DomainBBackendDispatcherHandler* m_agent { nullptr };
+};
+
+} // namespace Inspector
+### End File: TestBackendDispatchers.h
+
+### Begin File: TestBackendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &quot;config.h&quot;
+#include &quot;TestBackendDispatchers.h&quot;
+
+#include &lt;inspector/InspectorFrontendRouter.h&gt;
+#include &lt;inspector/InspectorValues.h&gt;
+#include &lt;wtf/NeverDestroyed.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+#include &quot;TestAlternateBackendDispatchers.h&quot;
+#endif
+
+namespace Inspector {
+
+DomainABackendDispatcherHandler::~DomainABackendDispatcherHandler() { }
+DomainBBackendDispatcherHandler::~DomainBBackendDispatcherHandler() { }
+
+Ref&lt;DomainABackendDispatcher&gt; DomainABackendDispatcher::create(BackendDispatcher&amp; backendDispatcher, DomainABackendDispatcherHandler* agent)
+{
+    return adoptRef(*new DomainABackendDispatcher(backendDispatcher, agent));
+}
+
+DomainABackendDispatcher::DomainABackendDispatcher(BackendDispatcher&amp; backendDispatcher, DomainABackendDispatcherHandler* agent)
+    : SupplementalBackendDispatcher(backendDispatcher)
+    , m_agent(agent)
+{
+    m_backendDispatcher-&gt;registerDispatcherForDomain(ASCIILiteral(&quot;DomainA&quot;), this);
+}
+
+void DomainABackendDispatcher::dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message)
+{
+    Ref&lt;DomainABackendDispatcher&gt; protect(*this);
+
+    RefPtr&lt;InspectorObject&gt; parameters;
+    message-&gt;getObject(ASCIILiteral(&quot;params&quot;), parameters);
+
+    if (method == &quot;enable&quot;)
+        enable(requestId, WTFMove(parameters));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', &quot;DomainA&quot;, '.', method, &quot;' was not found&quot;));
+}
+
+void DomainABackendDispatcher::enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp;)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+    if (m_alternateDispatcher) {
+        m_alternateDispatcher-&gt;enable(requestId);
+        return;
+    }
+#endif
+
+    ErrorString error;
+    Ref&lt;InspectorObject&gt; result = InspectorObject::create();
+    m_agent-&gt;enable(error);
+
+    if (!error.length())
+        m_backendDispatcher-&gt;sendResponse(requestId, WTFMove(result));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+Ref&lt;DomainBBackendDispatcher&gt; DomainBBackendDispatcher::create(BackendDispatcher&amp; backendDispatcher, DomainBBackendDispatcherHandler* agent)
+{
+    return adoptRef(*new DomainBBackendDispatcher(backendDispatcher, agent));
+}
+
+DomainBBackendDispatcher::DomainBBackendDispatcher(BackendDispatcher&amp; backendDispatcher, DomainBBackendDispatcherHandler* agent)
+    : SupplementalBackendDispatcher(backendDispatcher)
+    , m_agent(agent)
+{
+    m_backendDispatcher-&gt;registerDispatcherForDomain(ASCIILiteral(&quot;DomainB&quot;), this);
+}
+
+void DomainBBackendDispatcher::dispatch(long requestId, const String&amp; method, Ref&lt;InspectorObject&gt;&amp;&amp; message)
+{
+    Ref&lt;DomainBBackendDispatcher&gt; protect(*this);
+
+    RefPtr&lt;InspectorObject&gt; parameters;
+    message-&gt;getObject(ASCIILiteral(&quot;params&quot;), parameters);
+
+    if (method == &quot;enable&quot;)
+        enable(requestId, WTFMove(parameters));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::MethodNotFound, makeString('\'', &quot;DomainB&quot;, '.', method, &quot;' was not found&quot;));
+}
+
+void DomainBBackendDispatcher::enable(long requestId, RefPtr&lt;InspectorObject&gt;&amp;&amp;)
+{
+#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
+    if (m_alternateDispatcher) {
+        m_alternateDispatcher-&gt;enable(requestId);
+        return;
+    }
+#endif
+
+    ErrorString error;
+    Ref&lt;InspectorObject&gt; result = InspectorObject::create();
+    m_agent-&gt;enable(error);
+
+    if (!error.length())
+        m_backendDispatcher-&gt;sendResponse(requestId, WTFMove(result));
+    else
+        m_backendDispatcher-&gt;reportProtocolError(BackendDispatcher::ServerError, WTFMove(error));
+}
+
+} // namespace Inspector
+
+### End File: TestBackendDispatchers.cpp
+
+### Begin File: TestFrontendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include &quot;TestProtocolObjects.h&quot;
+#include &lt;inspector/InspectorValues.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace Inspector {
+
+class FrontendRouter;
+
+} // namespace Inspector
+### End File: TestFrontendDispatchers.h
+
+### Begin File: TestFrontendDispatchers.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &quot;config.h&quot;
+#include &quot;TestFrontendDispatchers.h&quot;
+
+#include &quot;InspectorFrontendRouter.h&quot;
+#include &lt;wtf/text/CString.h&gt;
+
+namespace Inspector {
+
+} // namespace Inspector
+
+### End File: TestFrontendDispatchers.cpp
+
+### Begin File: TestProtocolObjects.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#pragma once
+
+#include &lt;inspector/InspectorProtocolTypes.h&gt;
+#include &lt;wtf/Assertions.h&gt;
+
+namespace Inspector {
+
+
+
+namespace Protocol {
+
+
+
+
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+### End File: TestProtocolObjects.h
+
+### Begin File: TestProtocolObjects.cpp
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &quot;config.h&quot;
+#include &quot;TestProtocolObjects.h&quot;
+
+#include &lt;wtf/Optional.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+namespace Inspector {
+
+namespace Protocol {
+
+
+
+} // namespace Protocol
+
+} // namespace Inspector
+
+### End File: TestProtocolObjects.cpp
+
+### Begin File: TestProtocolBackendDispatchers.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#include &lt;JavaScriptCore/InspectorAlternateBackendDispatchers.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
+@protocol TestProtocolDomainADomainHandler;
+@protocol TestProtocolDomainBDomainHandler;
+
+namespace Inspector {
+
+
+class ObjCInspectorDomainABackendDispatcher final : public AlternateDomainABackendDispatcher {
+public:
+    ObjCInspectorDomainABackendDispatcher(id&lt;TestProtocolDomainADomainHandler&gt; handler) { m_delegate = handler; }
+    virtual void enable(long requestId) override;
+private:
+    RetainPtr&lt;id&lt;TestProtocolDomainADomainHandler&gt;&gt; m_delegate;
+};
+
+class ObjCInspectorDomainBBackendDispatcher final : public AlternateDomainBBackendDispatcher {
+public:
+    ObjCInspectorDomainBBackendDispatcher(id&lt;TestProtocolDomainBDomainHandler&gt; handler) { m_delegate = handler; }
+    virtual void enable(long requestId) override;
+private:
+    RetainPtr&lt;id&lt;TestProtocolDomainBDomainHandler&gt;&gt; m_delegate;
+};
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.h
+
+### Begin File: TestProtocolBackendDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;config.h&quot;
+#import &quot;TestProtocolBackendDispatchers.h&quot;
+
+#include &quot;TestProtocolInternal.h&quot;
+#include &quot;TestProtocolTypeConversions.h&quot;
+#include &lt;JavaScriptCore/InspectorValues.h&gt;
+
+namespace Inspector {
+
+void ObjCInspectorDomainABackendDispatcher::enable(long requestId)
+{
+    id errorCallback = ^(NSString *error) {
+        backendDispatcher()-&gt;reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+        backendDispatcher()-&gt;sendPendingErrors();
+    };
+
+    id successCallback = ^{
+        backendDispatcher()-&gt;sendResponse(requestId, InspectorObject::create());
+    };
+
+    [m_delegate enableWithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+void ObjCInspectorDomainBBackendDispatcher::enable(long requestId)
+{
+    id errorCallback = ^(NSString *error) {
+        backendDispatcher()-&gt;reportProtocolError(requestId, BackendDispatcher::ServerError, error);
+        backendDispatcher()-&gt;sendPendingErrors();
+    };
+
+    id successCallback = ^{
+        backendDispatcher()-&gt;sendResponse(requestId, InspectorObject::create());
+    };
+
+    [m_delegate enableWithErrorCallback:errorCallback successCallback:successCallback];
+}
+
+
+} // namespace Inspector
+
+### End File: TestProtocolBackendDispatchers.mm
+
+### Begin File: TestProtocolConfiguration.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &lt;WebInspector/TestProtocol.h&gt;
+
+__attribute__((visibility (&quot;default&quot;)))
+@interface TestProtocolConfiguration : NSObject
+@property (nonatomic, retain, setter=setDomainAHandler:) id&lt;TestProtocolDomainADomainHandler&gt; domainAHandler;
+@property (nonatomic, retain, setter=setDomainBHandler:) id&lt;TestProtocolDomainBDomainHandler&gt; domainBHandler;
+@end
+
+
+### End File: TestProtocolConfiguration.h
+
+### Begin File: TestProtocolConfiguration.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolConfiguration.h&quot;
+
+#import &quot;TestProtocolInternal.h&quot;
+#import &quot;TestProtocolBackendDispatchers.h&quot;
+#import &lt;JavaScriptCore/AlternateDispatchableAgent.h&gt;
+#import &lt;JavaScriptCore/AugmentableInspectorController.h&gt;
+#import &lt;JavaScriptCore/InspectorAlternateBackendDispatchers.h&gt;
+#import &lt;JavaScriptCore/InspectorBackendDispatchers.h&gt;
+
+using namespace Inspector;
+
+@implementation TestProtocolConfiguration
+{
+    AugmentableInspectorController* _controller;
+    id&lt;TestProtocolDomainADomainHandler&gt; _domainAHandler;
+    id&lt;TestProtocolDomainBDomainHandler&gt; _domainBHandler;
+}
+
+- (instancetype)initWithController:(AugmentableInspectorController*)controller
+{
+    self = [super init];
+    if (!self)
+        return nil;
+    ASSERT(controller);
+    _controller = controller;
+    return self;
+}
+
+- (void)dealloc
+{
+    [_domainAHandler release];
+    [_domainBHandler release];
+    [super dealloc];
+}
+
+- (void)setDomainAHandler:(id&lt;TestProtocolDomainADomainHandler&gt;)handler
+{
+    if (handler == _domainAHandler)
+        return;
+
+    [_domainAHandler release];
+    _domainAHandler = [handler retain];
+
+    auto alternateDispatcher = std::make_unique&lt;ObjCInspectorDomainABackendDispatcher&gt;(handler);
+    auto alternateAgent = std::make_unique&lt;AlternateDispatchableAgent&lt;DomainABackendDispatcher, AlternateDomainABackendDispatcher&gt;&gt;(ASCIILiteral(&quot;DomainA&quot;), *_controller, WTFMove(alternateDispatcher));
+    _controller-&gt;appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id&lt;TestProtocolDomainADomainHandler&gt;)domainAHandler
+{
+    return _domainAHandler;
+}
+
+- (void)setDomainBHandler:(id&lt;TestProtocolDomainBDomainHandler&gt;)handler
+{
+    if (handler == _domainBHandler)
+        return;
+
+    [_domainBHandler release];
+    _domainBHandler = [handler retain];
+
+    auto alternateDispatcher = std::make_unique&lt;ObjCInspectorDomainBBackendDispatcher&gt;(handler);
+    auto alternateAgent = std::make_unique&lt;AlternateDispatchableAgent&lt;DomainBBackendDispatcher, AlternateDomainBBackendDispatcher&gt;&gt;(ASCIILiteral(&quot;DomainB&quot;), *_controller, WTFMove(alternateDispatcher));
+    _controller-&gt;appendExtraAgent(WTFMove(alternateAgent));
+}
+
+- (id&lt;TestProtocolDomainBDomainHandler&gt;)domainBHandler
+{
+    return _domainBHandler;
+}
+
+@end
+
+
+### End File: TestProtocolConfiguration.mm
+
+### Begin File: TestProtocolEventDispatchers.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolInternal.h&quot;
+
+#import &quot;TestProtocolTypeConversions.h&quot;
+#import &lt;JavaScriptCore/InspectorValues.h&gt;
+
+using namespace Inspector;
+
+
+### End File: TestProtocolEventDispatchers.mm
+
+### Begin File: TestProtocol.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &lt;Foundation/Foundation.h&gt;
+
+#import &lt;WebInspector/RWIProtocolJSONObject.h&gt;
+
+
+
+
+
+
+
+
+@protocol TestProtocolDomainADomainHandler &lt;NSObject&gt;
+@required
+- (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+@protocol TestProtocolDomainBDomainHandler &lt;NSObject&gt;
+@required
+- (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
+@end
+
+
+
+
+### End File: TestProtocol.h
+
+### Begin File: TestProtocolInternal.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocol.h&quot;
+#import &quot;TestProtocolJSONObjectPrivate.h&quot;
+#import &lt;JavaScriptCore/AugmentableInspectorController.h&gt;
+#import &lt;JavaScriptCore/InspectorValues.h&gt;
+
+
+
+
+### End File: TestProtocolInternal.h
+
+### Begin File: TestProtocolTypeConversions.h
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocol.h&quot;
+#import &lt;WebInspector/RWIProtocolArrayConversions.h&gt;
+
+namespace Inspector {
+
+template&lt;typename ObjCEnumType&gt;
+ObjCEnumType fromProtocolString(const String&amp; value);
+
+} // namespace Inspector
+
+### End File: TestProtocolTypeConversions.h
+
+### Begin File: TestProtocolTypeConversions.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolTypeConversions.h&quot;
+
+#import &quot;TestProtocol.h&quot;
+#import &quot;TestProtocolTypeParser.h&quot;
+#import &lt;WebInspector/RWIProtocolJSONObjectPrivate.h&gt;
+
+using namespace Inspector;
+
+
+
+
+
+
+### End File: TestProtocolTypeConversions.mm
+
+### Begin File: TestProtocolTypes.mm
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 University of Washington. 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from worker-supported-domains.json
+// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
+
+#import &quot;TestProtocolInternal.h&quot;
+
+#import &quot;TestProtocolTypeConversions.h&quot;
+#import &lt;WebInspector/RWIProtocolJSONObjectPrivate.h&gt;
+#import &lt;JavaScriptCore/InspectorValues.h&gt;
+#import &lt;wtf/Assertions.h&gt;
+
+using namespace Inspector;
+
+
+### End File: TestProtocolTypes.mm
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericworkersupporteddomainsjson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/worker-supported-domains.json (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/worker-supported-domains.json                                (rev 0)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/worker-supported-domains.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+[
+{
+    &quot;domain&quot;: &quot;DomainA&quot;,
+    &quot;workerSupported&quot;: true,
+    &quot;commands&quot;: [{&quot;name&quot;: &quot;enable&quot;}]
+},
+{
+    &quot;domain&quot;: &quot;DomainB&quot;,
+    &quot;commands&quot;: [{&quot;name&quot;: &quot;enable&quot;}]
+}
+]
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebCore/ChangeLog        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2017-01-23  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Provide a way to trigger a Garbage Collection
+        https://bugs.webkit.org/show_bug.cgi?id=167345
+        &lt;rdar://problem/30102853&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/WorkerInspectorController.cpp:
+        (WebCore::WorkerInspectorController::WorkerInspectorController):
+        Include a HeapAgent so we can do Heap.gc on Workers.
+
+2017-01-23  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Cleanup WEB_TIMING code
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=167339
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorWorkerInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.cpp (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/WorkerInspectorController.cpp        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.cpp        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include &lt;inspector/InspectorFrontendChannel.h&gt;
</span><span class="cx"> #include &lt;inspector/InspectorFrontendDispatchers.h&gt;
</span><span class="cx"> #include &lt;inspector/InspectorFrontendRouter.h&gt;
</span><ins>+#include &lt;inspector/agents/InspectorHeapAgent.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> using namespace Inspector;
</span><span class="lines">@@ -74,14 +75,16 @@
</span><span class="cx">         workerGlobalScope,
</span><span class="cx">     };
</span><span class="cx"> 
</span><ins>+    auto heapAgent = std::make_unique&lt;InspectorHeapAgent&gt;(workerContext);
+
</ins><span class="cx">     m_agents.append(std::make_unique&lt;WorkerRuntimeAgent&gt;(workerContext));
</span><span class="cx">     m_agents.append(std::make_unique&lt;WorkerDebuggerAgent&gt;(workerContext));
</span><span class="cx"> 
</span><del>-    auto consoleAgent = std::make_unique&lt;WorkerConsoleAgent&gt;(workerContext, nullptr);
</del><ins>+    auto consoleAgent = std::make_unique&lt;WorkerConsoleAgent&gt;(workerContext, heapAgent.get());
</ins><span class="cx">     m_instrumentingAgents-&gt;setWebConsoleAgent(consoleAgent.get());
</span><span class="cx">     m_agents.append(WTFMove(consoleAgent));
</span><span class="cx"> 
</span><del>-    // FIXME: HeapAgent
</del><ins>+    m_agents.append(WTFMove(heapAgent));
</ins><span class="cx"> 
</span><span class="cx">     if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager-&gt;commandLineAPIHost()) {
</span><span class="cx">         commandLineAPIHost-&gt;init(
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/ChangeLog        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -1,3 +1,57 @@
</span><ins>+2017-01-23  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Provide a way to trigger a Garbage Collection
+        https://bugs.webkit.org/show_bug.cgi?id=167345
+        &lt;rdar://problem/30102853&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        New &quot;Garbage collect&quot; tooltip.
+
+        * Versions/Inspector-iOS-10.3.json:
+        * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
+        Update 10.3 so it generates its list of supported domains for workers.
+        Note that the Heap domain is not be available in this backend but it is now.
+
+        * UserInterface/Protocol/Connection.js:
+        (InspectorBackend.WorkerConnection):
+        * UserInterface/Protocol/HeapObserver.js:
+        (WebInspector.HeapObserver.prototype.garbageCollected):
+        * UserInterface/Protocol/InspectorBackend.js:
+        (InspectorBackendClass):
+        (InspectorBackendClass.prototype.get workerSupportedDomains):
+        (InspectorBackendClass.prototype.workerSupportedDomain):
+
+        * UserInterface/Images/NavigationItemClear.svg: Added.
+        * UserInterface/Images/NavigationItemGarbageCollect.svg: Added.
+        New image for Garbage Collection. Better image for clearing.
+        
+        * UserInterface/Images/gtk/NavigationItemClear.svg: Added.
+        Copy the Trash icon for Clear for gtk.
+
+        * UserInterface/Protocol/Target.js:
+        (WebInspector.Target.prototype.get HeapAgent):
+        * UserInterface/Protocol/WorkerTarget.js:
+        (WebInspector.WorkerTarget):
+        Include Heap agent for Workers.
+
+        * UserInterface/Views/LogContentView.js:
+        (WebInspector.LogContentView):
+        (WebInspector.LogContentView.prototype.get navigationItems):
+        (WebInspector.LogContentView.prototype._garbageCollect):
+        Add garbage collect button which triggers gc on all capable targets.
+
+        * UserInterface/Views/NetworkGridContentView.js:
+        (WebInspector.NetworkGridContentView):
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WebInspector.TimelineRecordingContentView):
+        Update the Clear icon to an improved icon.
+
+        * UserInterface/Controllers/HeapManager.js:
+        (WebInspector.HeapManager.prototype.garbageCollected):
+        Timelines only shows Main Target events, do not show GC events for Workers.
+
</ins><span class="cx"> 2017-01-23  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: long press on New Tab Tab Item should show context menu with recently closed tabs that are still closed
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -180,6 +180,7 @@
</span><span class="cx"> localizedStrings[&quot;Code&quot;] = &quot;Code&quot;;
</span><span class="cx"> localizedStrings[&quot;Collapse All&quot;] = &quot;Collapse All&quot;;
</span><span class="cx"> localizedStrings[&quot;Collapse columns&quot;] = &quot;Collapse columns&quot;;
</span><ins>+localizedStrings[&quot;Collect garbage&quot;] = &quot;Collect garbage&quot;;
</ins><span class="cx"> localizedStrings[&quot;Color&quot;] = &quot;Color&quot;;
</span><span class="cx"> localizedStrings[&quot;Comment&quot;] = &quot;Comment&quot;;
</span><span class="cx"> localizedStrings[&quot;Comment All Properties&quot;] = &quot;Comment All Properties&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersHeapManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/HeapManager.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/HeapManager.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/HeapManager.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -35,10 +35,14 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><del>-    garbageCollected(payload)
</del><ins>+    garbageCollected(target, payload)
</ins><span class="cx">     {
</span><span class="cx">         // Called from WebInspector.HeapObserver.
</span><span class="cx"> 
</span><ins>+        // FIXME: &lt;https://webkit.org/b/167323&gt; Web Inspector: Enable Memory profiling in Workers
+        if (target !== WebInspector.mainTarget)
+            return;
+
</ins><span class="cx">         let collection = WebInspector.GarbageCollection.fromPayload(payload);
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.HeapManager.Event.GarbageCollected, {collection});
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesNavigationItemClearsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemClear.svg (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemClear.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemClear.svg        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2017 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;currentColor&quot; fill-rule=&quot;evenodd&quot; d=&quot;M 6.85268842 1.31225524 L 2.2924099 1.31225524 C 1.02521157 1.31225524 0 2.33984362 0 3.60743812 L 0 12.729684 L 1.14285714 12.7391526 L 1.14285714 12.6691677 L 1.14358757 12.6691523 C 1.14213118 12.5505612 1.15865867 12.3224063 1.21233688 11.9970222 C 1.30136713 11.4573428 1.46586283 10.8392793 1.72513981 10.1519913 C 2.43346319 8.27437684 3.70022787 6.24707859 5.66336654 4.13473232 L 8.07379426 6.54516004 C 6.2997923 8.95249292 5.83493999 10.7203417 5.78635567 13.8907914 L 5.77971622 13.8907988 L 5.78225654 14.3244001 C 5.78185029 14.4262334 5.78180246 14.5294892 5.78208681 14.6342277 C 5.78258859 14.8189069 5.78258859 14.8189069 5.7827549 15.0017468 L 5.78622489 15.0017468 L 5.78641183 15.0336559 L 13.7075901 15.0248668 C 14.9747884 15.0248668 16 13.9972785 16 12.729684 L 16 3.60743812 C 16 2.34292982 14.9736531 1.31225524 13.7075901 1.31225524 L 9.47719891 1.31225524 L 8.16494367 0 L 6.85268
 842 1.31225524 L 6.85268842 1.31225524 Z M 8.97096491 7.25423676 C 7.84755495 8.78544902 7.31340061 10.0146365 7.08158958 11.6437637 L 14.9321757 11.6005727 L 14.8678561 4.73915256 L 13.7142857 4.73915256 L 13.7142857 3.59629542 L 14.8571429 3.59629542 C 14.8571429 2.96772377 14.3428563 2.45343828 13.7142857 2.45050859 L 10.6162464 2.45130276 L 12.1950727 4.030129 L 8.97096491 7.25423676 L 8.97096491 7.25423676 Z M 5.71238381 2.45255986 L 2.28571429 2.45343828 C 1.65714373 2.45343828 1.14285714 2.96772377 1.14285714 3.59629542 L 4.60612667 3.59629542 C 4.68781604 3.50633989 4.77068025 3.41627117 4.85472816 3.32609397 L 4.84678894 3.31815472 L 5.71238381 2.45255986 Z M 1.14285714 8.60749667 L 1.14285714 4.73915256 L 3.62561145 4.73915256 C 2.55552925 6.0633814 1.73771096 7.35803319 1.14285714 8.60749667 L 1.14285714 8.60749667 Z M 6.92928635 13.8895254 L 13.7142857 13.8820097 C 14.3350157 13.8820097 14.8459386 13.3804732 14.9393236 12.7434078 L 6.96927289 12.787256 C 6.948113
 54 13.1334719 6.93542219 13.4993353 6.92928635 13.8895254 Z M 6.46303301 3.31815472 L 8.87691794 5.73203965 L 10.5788286 4.030129 L 8.16494367 1.61624407 L 6.46303301 3.31815472 Z&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesNavigationItemGarbageCollectsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemGarbageCollect.svg (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemGarbageCollect.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/NavigationItemGarbageCollect.svg        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;!-- Copyright © 2017 Apple Inc. All rights reserved. --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+    &lt;path fill=&quot;currentColor&quot; fill-rule=&quot;evenodd&quot; d=&quot;M 10.1589104 13.4997743C 7.6207023 14.9652094 4.41851284 14.2388343 2.74398502 11.9078979L 4.31515363 11.0007832.421523602 8.89653784.296314315 13.3210612 1.65145707 12.5386692C 3.54608019 15.2801236 7.14278804 16.2718354 10.1691404 14.9049059L 10.1589104 13.4997743zM 1.67902543 8.51419182C 1.7234718 5.64447423 3.9060071 3.29358667 6.70386082 2.98429963L 6.70386082 4.76349105 10.4730058 2.44363124 6.70386082.122935137 6.70386082 1.72158218C 3.41613949 2.01785462.792429597 4.61690383.457986941 7.89347401.457986941 7.89347401 1.67856516 8.54390992 1.67902543 8.51419182zM 11.412545 3.02613865C 11.412545 3.02613865 10.2139156 3.73931007 10.2411398 3.75563434 12.7083426 5.23502792 13.6489697 8.31336275 12.5013398 10.8944151L 11.1011966 10.0860421 11.2256817 14.5101473 15.1200359 12.4063201 13.5944092 11.5254991C 14.9935767 8.53568734 14.068459 4.96425679 11.412545 3.02613865 Z&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceImagesgtkNavigationItemClearsvg"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemClear.svg (0 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemClear.svg                                (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/gtk/NavigationItemClear.svg        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) --&gt;
+&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;root&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+ &lt;path d=&quot;m3.5 5v9h9v-9h2v9c0 2-2 2-2 2h-9c-2 0-2-2-2-2v-9zm4 1h1v6h-1zm2 0h1v6h-1zm-4 0h0.99999v6h-0.99999zm-1-6c-2 0-2 2-2 2h-2v2h15v-2h-2c0-2-2-2-2-2h-7zm0 1h7v1h-7v-1z&quot;/&gt;
+&lt;/svg&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolConnectionjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -295,8 +295,7 @@
</span><span class="cx"> 
</span><span class="cx">         this._workerId = workerId;
</span><span class="cx"> 
</span><del>-        // FIXME: Get this list from generated InspectorBackendCommands / InspectorBackend.
-        const workerDomains = [&quot;Runtime&quot;, &quot;Console&quot;, &quot;Debugger&quot;];
</del><ins>+        const workerDomains = InspectorBackend.workerSupportedDomains;
</ins><span class="cx"> 
</span><span class="cx">         for (let domain of workerDomains) {
</span><span class="cx">             let agent = InspectorBackend._agents[domain];
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolHeapObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/HeapObserver.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx">     garbageCollected(collection)
</span><span class="cx">     {
</span><del>-        WebInspector.heapManager.garbageCollected(collection);
</del><ins>+        WebInspector.heapManager.garbageCollected(this.target, collection);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     trackingStart(timestamp, snapshotStringData)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolInspectorBackendjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">         this._activeTracers = [this._defaultTracer];
</span><span class="cx"> 
</span><span class="cx">         this._dumpInspectorTimeStats = false;
</span><ins>+        this._workerSupportedDomains = [];
</ins><span class="cx"> 
</span><span class="cx">         let setting = WebInspector.autoLogProtocolMessagesSetting = new WebInspector.Setting(&quot;auto-collect-protocol-messages&quot;, false);
</span><span class="cx">         setting.addEventListener(WebInspector.Setting.Event.Changed, this._startOrStopAutomaticTracing.bind(this));
</span><span class="lines">@@ -55,6 +56,8 @@
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><ins>+    get workerSupportedDomains() { return this._workerSupportedDomains; }
+
</ins><span class="cx">     // It's still possible to set this flag on InspectorBackend to just
</span><span class="cx">     // dump protocol traffic as it happens. For more complex uses of
</span><span class="cx">     // protocol data, install a subclass of WebInspector.ProtocolTracer.
</span><span class="lines">@@ -168,6 +171,11 @@
</span><span class="cx">         return null;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    workerSupportedDomain(domainName)
+    {
+        this._workerSupportedDomains.push(domainName);
+    }
+
</ins><span class="cx">     // Private
</span><span class="cx"> 
</span><span class="cx">     _startOrStopAutomaticTracing()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolLegacy103InspectorBackendCommandsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> InspectorBackend.registerCommand(&quot;Console.setMonitoringXHREnabled&quot;, [{&quot;name&quot;: &quot;enabled&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: false}], []);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;Console.addInspectedNode&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}], []);
</span><span class="cx"> InspectorBackend.activateDomain(&quot;Console&quot;);
</span><ins>+InspectorBackend.workerSupportedDomain(&quot;Console&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // DOM.
</span><span class="cx"> InspectorBackend.registerDOMDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, &quot;DOM&quot;);
</span><span class="lines">@@ -218,6 +219,7 @@
</span><span class="cx"> InspectorBackend.registerCommand(&quot;Debugger.evaluateOnCallFrame&quot;, [{&quot;name&quot;: &quot;callFrameId&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;expression&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;objectGroup&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true}, {&quot;name&quot;: &quot;includeCommandLineAPI&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true}, {&quot;name&quot;: &quot;doNotPauseOnExceptionsAndMuteConsole&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true}, {&quot;name&quot;: &quot;returnByValue&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true}, {&quot;name&quot;: &quot;generatePreview&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true}, {&quot;name&quot;: &quot;saveResult&quot;, &quot;type&quot;: &quot
 ;boolean&quot;, &quot;optional&quot;: true}], [&quot;result&quot;, &quot;wasThrown&quot;, &quot;savedResultIndex&quot;]);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;Debugger.setOverlayMessage&quot;, [{&quot;name&quot;: &quot;message&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true}], []);
</span><span class="cx"> InspectorBackend.activateDomain(&quot;Debugger&quot;);
</span><ins>+InspectorBackend.workerSupportedDomain(&quot;Debugger&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // Heap.
</span><span class="cx"> InspectorBackend.registerHeapDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, &quot;Heap&quot;);
</span><span class="lines">@@ -368,6 +370,7 @@
</span><span class="cx"> InspectorBackend.registerCommand(&quot;Runtime.disableControlFlowProfiler&quot;, [], []);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;Runtime.getBasicBlocks&quot;, [{&quot;name&quot;: &quot;sourceID&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}], [&quot;basicBlocks&quot;]);
</span><span class="cx"> InspectorBackend.activateDomain(&quot;Runtime&quot;);
</span><ins>+InspectorBackend.workerSupportedDomain(&quot;Runtime&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // ScriptProfiler.
</span><span class="cx"> InspectorBackend.registerScriptProfilerDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, &quot;ScriptProfiler&quot;);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolTargetjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Target.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Target.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Target.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     get RuntimeAgent() { return this._connection._agents.Runtime; }
</span><span class="cx">     get ConsoleAgent() { return this._connection._agents.Console; }
</span><span class="cx">     get DebuggerAgent() { return this._connection._agents.Debugger; }
</span><ins>+    get HeapAgent() { return this._connection._agents.Heap; }
</ins><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolWorkerTargetjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/WorkerTarget.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/WorkerTarget.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/WorkerTarget.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -45,6 +45,9 @@
</span><span class="cx"> 
</span><span class="cx">         if (this.ConsoleAgent)
</span><span class="cx">             this.ConsoleAgent.enable();
</span><ins>+
+        if (this.HeapAgent)
+            this.HeapAgent.enable();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Protected (Target)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -77,11 +77,14 @@
</span><span class="cx">         this._scopeBar = new WebInspector.ScopeBar(&quot;log-scope-bar&quot;, scopeBarItems, scopeBarItems[0]);
</span><span class="cx">         this._scopeBar.addEventListener(WebInspector.ScopeBar.Event.SelectionChanged, this._scopeBarSelectionDidChange, this);
</span><span class="cx"> 
</span><del>-        this._clearLogNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-log&quot;, WebInspector.UIString(&quot;Clear log (%s or %s)&quot;).format(WebInspector.clearKeyboardShortcut.displayName, this._logViewController.messagesAlternateClearKeyboardShortcut.displayName), &quot;Images/NavigationItemTrash.svg&quot;, 15, 15);
</del><ins>+        this._garbageCollectNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-log&quot;, WebInspector.UIString(&quot;Collect garbage&quot;), &quot;Images/NavigationItemGarbageCollect.svg&quot;, 16, 16);
+        this._garbageCollectNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._garbageCollect, this);
+
+        let clearImageDimensions = WebInspector.Platform.name === &quot;mac&quot; ? 16 : 15;
+        this._clearLogNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-log&quot;, WebInspector.UIString(&quot;Clear log (%s or %s)&quot;).format(WebInspector.clearKeyboardShortcut.displayName, this._logViewController.messagesAlternateClearKeyboardShortcut.displayName), &quot;Images/NavigationItemClear.svg&quot;, clearImageDimensions, clearImageDimensions);
</ins><span class="cx">         this._clearLogNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._clearLog, this);
</span><span class="cx"> 
</span><del>-        var toolTip = WebInspector.UIString(&quot;Show console tab&quot;);
-        this._showConsoleTabNavigationItem = new WebInspector.ButtonNavigationItem(&quot;show-tab&quot;, toolTip, &quot;Images/SplitToggleUp.svg&quot;, 16, 16);
</del><ins>+        this._showConsoleTabNavigationItem = new WebInspector.ButtonNavigationItem(&quot;show-tab&quot;, WebInspector.UIString(&quot;Show console tab&quot;), &quot;Images/SplitToggleUp.svg&quot;, 16, 16);
</ins><span class="cx">         this._showConsoleTabNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._showConsoleTab, this);
</span><span class="cx"> 
</span><span class="cx">         this.messagesElement.addEventListener(&quot;contextmenu&quot;, this._handleContextMenuEvent.bind(this), false);
</span><span class="lines">@@ -98,7 +101,10 @@
</span><span class="cx"> 
</span><span class="cx">     get navigationItems()
</span><span class="cx">     {
</span><del>-        let navigationItems = [this._findBanner, this._scopeBar, this._clearLogNavigationItem];
</del><ins>+        let navigationItems = [this._findBanner, this._scopeBar];
+        if (HeapAgent.gc)
+            navigationItems.push(this._garbageCollectNavigationItem);
+        navigationItems.push(this._clearLogNavigationItem);
</ins><span class="cx">         if (WebInspector.isShowingSplitConsole())
</span><span class="cx">             navigationItems.push(this._showConsoleTabNavigationItem);
</span><span class="cx">         return navigationItems;
</span><span class="lines">@@ -672,6 +678,15 @@
</span><span class="cx">         WebInspector.logManager.requestClearMessages();
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    _garbageCollect()
+    {
+        // COMPATIBILITY (iOS 10.3): Worker targets did not support HeapAgent.
+        for (let target of WebInspector.targets) {
+            if (target.HeapAgent)
+                target.HeapAgent.gc();
+        }
+    }
+
</ins><span class="cx">     _scopeBarSelectionDidChange(event)
</span><span class="cx">     {
</span><span class="cx">         var item = this._scopeBar.selectedItems[0];
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsNetworkGridContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -101,7 +101,8 @@
</span><span class="cx">         networkTimeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this);
</span><span class="cx">         networkTimeline.addEventListener(WebInspector.Timeline.Event.Reset, this._networkTimelineReset, this);
</span><span class="cx"> 
</span><del>-        this._clearNetworkItemsNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-network-items&quot;, WebInspector.UIString(&quot;Clear Network Items (%s)&quot;).format(WebInspector.clearKeyboardShortcut.displayName), &quot;Images/NavigationItemTrash.svg&quot;, 15, 15);
</del><ins>+        let clearImageDimensions = WebInspector.Platform.name === &quot;mac&quot; ? 16 : 15;
+        this._clearNetworkItemsNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-network-items&quot;, WebInspector.UIString(&quot;Clear Network Items (%s)&quot;).format(WebInspector.clearKeyboardShortcut.displayName), &quot;Images/NavigationItemClear.svg&quot;, clearImageDimensions, clearImageDimensions);
</ins><span class="cx">         this._clearNetworkItemsNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, () =&gt; this.reset());
</span><span class="cx"> 
</span><span class="cx">         this._pendingRecords = [];
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineRecordingContentViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -57,7 +57,8 @@
</span><span class="cx">         this._timelineContentBrowser.navigationBar.addNavigationItem(this._filterBarNavigationItem);
</span><span class="cx">         this.addSubview(this._timelineContentBrowser);
</span><span class="cx"> 
</span><del>-        this._clearTimelineNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-timeline&quot;, WebInspector.UIString(&quot;Clear Timeline&quot;), &quot;Images/NavigationItemTrash.svg&quot;, 15, 15);
</del><ins>+        let clearImageDimensions = WebInspector.Platform.name === &quot;mac&quot; ? 16 : 15;
+        this._clearTimelineNavigationItem = new WebInspector.ButtonNavigationItem(&quot;clear-timeline&quot;, WebInspector.UIString(&quot;Clear Timeline&quot;), &quot;Images/NavigationItemClear.svg&quot;, clearImageDimensions, clearImageDimensions);
</ins><span class="cx">         this._clearTimelineNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._clearTimeline, this);
</span><span class="cx"> 
</span><span class="cx">         this._overviewTimelineView = new WebInspector.OverviewTimelineView(recording);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIVersionsInspectoriOS103json"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.3.json (211074 => 211075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.3.json        2017-01-24 03:12:53 UTC (rev 211074)
+++ trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.3.json        2017-01-24 03:19:03 UTC (rev 211075)
</span><span class="lines">@@ -548,6 +548,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Console&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Console domain defines methods and events for interaction with the JavaScript console. Console collects messages created by means of the &lt;a href='http://getfirebug.com/wiki/index.php/Console_API'&gt;JavaScript Console API&lt;/a&gt;. One needs to enable this domain using &lt;code&gt;enable&lt;/code&gt; command in order to start receiving the console messages. Browser collects messages issued while console domain is not enabled as well and reports them using &lt;code&gt;messageAdded&lt;/code&gt; notification upon enabling.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;ConsoleMessage&quot;,
</span><span class="lines">@@ -1469,6 +1470,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Debugger&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;BreakpointId&quot;,
</span><span class="lines">@@ -3081,6 +3083,7 @@
</span><span class="cx"> {
</span><span class="cx">     &quot;domain&quot;: &quot;Runtime&quot;,
</span><span class="cx">     &quot;description&quot;: &quot;Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.&quot;,
</span><ins>+    &quot;workerSupported&quot;: true,
</ins><span class="cx">     &quot;types&quot;: [
</span><span class="cx">         {
</span><span class="cx">             &quot;id&quot;: &quot;RemoteObjectId&quot;,
</span></span></pre>
</div>
</div>

</body>
</html>