<!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>[182039] trunk/Source/WebInspectorUI</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/182039">182039</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-03-26 16:37:30 -0700 (Thu, 26 Mar 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Convert Base and Protocol files to ES6 classes
https://bugs.webkit.org/show_bug.cgi?id=143106
Reviewed by Joseph Pecoraro.
* UserInterface/Base/EventListener.js:
* UserInterface/Base/EventListenerSet.js:
* UserInterface/Protocol/ApplicationCacheObserver.js:
* UserInterface/Protocol/CSSObserver.js:
* UserInterface/Protocol/ConsoleObserver.js:
* UserInterface/Protocol/DOMObserver.js:
* UserInterface/Protocol/DOMStorageObserver.js:
* UserInterface/Protocol/DatabaseObserver.js:
* UserInterface/Protocol/DebuggerObserver.js:
* UserInterface/Protocol/InspectorBackend.js:
* UserInterface/Protocol/InspectorObserver.js:
* UserInterface/Protocol/LayerTreeObserver.js:
* UserInterface/Protocol/MessageDispatcher.js:
* UserInterface/Protocol/NetworkObserver.js:
* UserInterface/Protocol/PageObserver.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Protocol/ReplayObserver.js:
* UserInterface/Protocol/RuntimeObserver.js:
* UserInterface/Protocol/TimelineObserver.js:
Converted to ES6 classes where possible.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseEventListenerjs">trunk/Source/WebInspectorUI/UserInterface/Base/EventListener.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseEventListenerSetjs">trunk/Source/WebInspectorUI/UserInterface/Base/EventListenerSet.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolApplicationCacheObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/ApplicationCacheObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolCSSObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/CSSObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolConsoleObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolDOMObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolDOMStorageObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMStorageObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolDatabaseObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/DatabaseObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolDebuggerObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolInspectorBackendjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolInspectorObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolLayerTreeObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/LayerTreeObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolMessageDispatcherjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolNetworkObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/NetworkObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolPageObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolReplayObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/ReplayObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolRuntimeObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/RuntimeObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolTimelineObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/TimelineObserver.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2015-03-26 Timothy Hatcher <timothy@apple.com>
+
+ Web Inspector: Convert Base and Protocol files to ES6 classes
+ https://bugs.webkit.org/show_bug.cgi?id=143106
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/EventListener.js:
+ * UserInterface/Base/EventListenerSet.js:
+ * UserInterface/Protocol/ApplicationCacheObserver.js:
+ * UserInterface/Protocol/CSSObserver.js:
+ * UserInterface/Protocol/ConsoleObserver.js:
+ * UserInterface/Protocol/DOMObserver.js:
+ * UserInterface/Protocol/DOMStorageObserver.js:
+ * UserInterface/Protocol/DatabaseObserver.js:
+ * UserInterface/Protocol/DebuggerObserver.js:
+ * UserInterface/Protocol/InspectorBackend.js:
+ * UserInterface/Protocol/InspectorObserver.js:
+ * UserInterface/Protocol/LayerTreeObserver.js:
+ * UserInterface/Protocol/MessageDispatcher.js:
+ * UserInterface/Protocol/NetworkObserver.js:
+ * UserInterface/Protocol/PageObserver.js:
+ * UserInterface/Protocol/RemoteObject.js:
+ * UserInterface/Protocol/ReplayObserver.js:
+ * UserInterface/Protocol/RuntimeObserver.js:
+ * UserInterface/Protocol/TimelineObserver.js:
+ Converted to ES6 classes where possible.
+
</ins><span class="cx"> 2015-03-25 Tobias Reiss <tobi+webkit@basecode.de>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Add ESLint "Disallow Undeclared Variables" rule and enable ES6 env
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseEventListenerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/EventListener.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/EventListener.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/EventListener.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><ins>+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2013, 2014 University of Washington. All rights reserved.
</span><del>- * Copyright (C) 2014 Apple Inc. All rights reserved.
</del><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -24,16 +24,19 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.EventListener = function(thisObject, fireOnce)
</del><ins>+WebInspector.EventListener = class EventListener
</ins><span class="cx"> {
</span><del>- this._thisObject = thisObject;
- this._emitter = null;
- this._callback = null;
- this._fireOnce = fireOnce;
-};
</del><ins>+ constructor(thisObject, fireOnce)
+ {
+ this._thisObject = thisObject;
+ this._emitter = null;
+ this._callback = null;
+ this._fireOnce = fireOnce;
+ }
</ins><span class="cx">
</span><del>-WebInspector.EventListener.prototype = {
- connect: function(emitter, type, callback, usesCapture)
</del><ins>+ // Public
+
+ connect(emitter, type, callback, usesCapture)
</ins><span class="cx"> {
</span><span class="cx"> console.assert(!this._emitter && !this._callback, "EventListener already bound to a callback.", this);
</span><span class="cx"> console.assert(callback, "Missing callback for event: " + type);
</span><span class="lines">@@ -64,9 +67,9 @@
</span><span class="cx"> this._emitter.addEventListener(this._type, this._callback, this._usesCapture);
</span><span class="cx"> else
</span><span class="cx"> this._emitter.addEventListener(this._type, this._callback, this._thisObject);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- disconnect: function()
</del><ins>+ disconnect()
</ins><span class="cx"> {
</span><span class="cx"> console.assert(this._emitter && this._callback, "EventListener is not bound to a callback.", this);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseEventListenerSetjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/EventListenerSet.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/EventListenerSet.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/EventListenerSet.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><ins>+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2013, 2014 University of Washington. All rights reserved.
</span><del>- * Copyright (C) 2014 Apple Inc. All rights reserved.
</del><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,17 +28,21 @@
</span><span class="cx"> // Add DOM or Inspector event listeners to the set using `register()`.
</span><span class="cx"> // Use `install()` and `uninstall()` to enable or disable all listeners
</span><span class="cx"> // in the set at once.
</span><del>-WebInspector.EventListenerSet = function(defaultThisObject, name)
</del><ins>+
+WebInspector.EventListenerSet = class EventListenerSet
</ins><span class="cx"> {
</span><del>- this.name = name;
- this._defaultThisObject = defaultThisObject;
</del><ins>+ constructor(defaultThisObject, name)
+ {
+ this.name = name;
+ this._defaultThisObject = defaultThisObject;
</ins><span class="cx">
</span><del>- this._listeners = [];
- this._installed = false;
-}
</del><ins>+ this._listeners = [];
+ this._installed = false;
+ }
</ins><span class="cx">
</span><del>-WebInspector.EventListenerSet.prototype = {
- register: function(emitter, type, callback, thisObject, usesCapture)
</del><ins>+ // Public
+
+ register(emitter, type, callback, thisObject, usesCapture)
</ins><span class="cx"> {
</span><span class="cx"> console.assert(callback, "Missing callback for event: " + type);
</span><span class="cx"> console.assert(type, "Tried to register listener for unknown event: " + type);
</span><span class="lines">@@ -49,16 +53,16 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> this._listeners.push({listener: new WebInspector.EventListener(thisObject || this._defaultThisObject), emitter, type, callback, usesCapture});
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- unregister: function()
</del><ins>+ unregister()
</ins><span class="cx"> {
</span><span class="cx"> if (this._installed)
</span><span class="cx"> this.uninstall();
</span><span class="cx"> this._listeners = [];
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- install: function()
</del><ins>+ install()
</ins><span class="cx"> {
</span><span class="cx"> console.assert(!this._installed, "Already installed listener group: " + this.name);
</span><span class="cx"> if (this._installed)
</span><span class="lines">@@ -68,9 +72,9 @@
</span><span class="cx">
</span><span class="cx"> for (var data of this._listeners)
</span><span class="cx"> data.listener.connect(data.emitter, data.type, data.callback, data.usesCapture);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- uninstall: function(unregisterListeners)
</del><ins>+ uninstall(unregisterListeners)
</ins><span class="cx"> {
</span><span class="cx"> console.assert(this._installed, "Trying to uninstall listener group " + this.name + ", but it isn't installed.");
</span><span class="cx"> if (!this._installed)
</span><span class="lines">@@ -83,5 +87,5 @@
</span><span class="cx">
</span><span class="cx"> if (unregisterListeners)
</span><span class="cx"> this._listeners = [];
</span><del>- },
-}
</del><ins>+ }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolApplicationCacheObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/ApplicationCacheObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/ApplicationCacheObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/ApplicationCacheObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,26 +23,17 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.ApplicationCacheObserver = function()
</del><ins>+WebInspector.ApplicationCacheObserver = class ApplicationCacheObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.ApplicationCacheObserver.prototype = {
- constructor: WebInspector.ApplicationCacheObserver,
-
</del><span class="cx"> // Events defined by the "ApplicationCache" domain.
</span><span class="cx">
</span><del>- applicationCacheStatusUpdated: function(frameId, manifestURL, status)
</del><ins>+ applicationCacheStatusUpdated(frameId, manifestURL, status)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.applicationCacheManager.applicationCacheStatusUpdated(frameId, manifestURL, status);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- networkStateUpdated: function(isNowOnline)
</del><ins>+ networkStateUpdated(isNowOnline)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.applicationCacheManager.networkStateUpdated(isNowOnline);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.ApplicationCacheObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolCSSObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/CSSObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/CSSObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/CSSObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,67 +23,58 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.CSSObserver = function()
</del><ins>+WebInspector.CSSObserver = class CSSObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.CSSObserver.prototype = {
- constructor: WebInspector.CSSObserver,
-
</del><span class="cx"> // Events defined by the "CSS" domain.
</span><span class="cx">
</span><del>- mediaQueryResultChanged: function()
</del><ins>+ mediaQueryResultChanged()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.cssStyleManager.mediaQueryResultChanged();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- styleSheetChanged: function(styleSheetId)
</del><ins>+ styleSheetChanged(styleSheetId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.cssStyleManager.styleSheetChanged(styleSheetId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- styleSheetAdded: function(header)
</del><ins>+ styleSheetAdded(header)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented. <rdar://problem/13213680>
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- styleSheetRemoved: function(header)
</del><ins>+ styleSheetRemoved(header)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented. <rdar://problem/13213680>
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- namedFlowCreated: function(namedFlow)
</del><ins>+ namedFlowCreated(namedFlow)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager.namedFlowCreated(namedFlow);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- namedFlowRemoved: function(documentNodeId, flowName)
</del><ins>+ namedFlowRemoved(documentNodeId, flowName)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager.namedFlowRemoved(documentNodeId, flowName);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> // COMPATIBILITY (iOS 7): regionLayoutUpdated was removed and replaced by regionOversetChanged.
</span><del>- regionLayoutUpdated: function(namedFlow)
</del><ins>+ regionLayoutUpdated(namedFlow)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager.regionLayoutUpdated(namedFlow);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- regionOversetChanged: function(namedFlow)
</del><ins>+ regionOversetChanged(namedFlow)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager.regionOversetChanged(namedFlow);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- registeredNamedFlowContentElement: function(documentNodeId, flowName, contentNodeId, nextContentElementNodeId)
</del><ins>+ registeredNamedFlowContentElement(documentNodeId, flowName, contentNodeId, nextContentElementNodeId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager.registeredNamedFlowContentElement(documentNodeId, flowName, contentNodeId, nextContentElementNodeId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- unregisteredNamedFlowContentElement: function(documentNodeId, flowName, contentNodeId)
</del><ins>+ unregisteredNamedFlowContentElement(documentNodeId, flowName, contentNodeId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager.unregisteredNamedFlowContentElement(documentNodeId, flowName, contentNodeId);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.CSSObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolConsoleObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,18 +23,11 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.ConsoleObserver = function()
</del><ins>+WebInspector.ConsoleObserver = class ConsoleObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.ConsoleObserver.prototype = {
- constructor: WebInspector.ConsoleObserver,
-
</del><span class="cx"> // Events defined by the "Console" domain.
</span><span class="cx">
</span><del>- messageAdded: function(message)
</del><ins>+ messageAdded(message)
</ins><span class="cx"> {
</span><span class="cx"> if (message.type === "assert" && !message.text)
</span><span class="cx"> message.text = WebInspector.UIString("Assertion");
</span><span class="lines">@@ -48,17 +41,15 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> WebInspector.logManager.messageWasAdded(message.source, message.level, message.text, message.type, message.url, message.line, message.column || 0, message.repeatCount, message.parameters, message.stackTrace, message.networkRequestId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- messageRepeatCountUpdated: function(count)
</del><ins>+ messageRepeatCountUpdated(count)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.logManager.messageRepeatCountUpdated(count);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- messagesCleared: function()
</del><ins>+ messagesCleared()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.logManager.messagesCleared();
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.ConsoleObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolDOMObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,71 +23,62 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.DOMObserver = function()
</del><ins>+WebInspector.DOMObserver = class DOMObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.DOMObserver.prototype = {
- constructor: WebInspector.DOMObserver,
-
</del><span class="cx"> // Events defined by the "DOM" domain.
</span><span class="cx">
</span><del>- documentUpdated: function()
</del><ins>+ documentUpdated()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._documentUpdated();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- setChildNodes: function(parentId, payloads)
</del><ins>+ setChildNodes(parentId, payloads)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._setChildNodes(parentId, payloads);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- attributeModified: function(nodeId, name, value)
</del><ins>+ attributeModified(nodeId, name, value)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._attributeModified(nodeId, name, value);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- attributeRemoved: function(nodeId, name)
</del><ins>+ attributeRemoved(nodeId, name)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._attributeRemoved(nodeId, name);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- inlineStyleInvalidated: function(nodeIds)
</del><ins>+ inlineStyleInvalidated(nodeIds)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._inlineStyleInvalidated(nodeIds);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- characterDataModified: function(nodeId, characterData)
</del><ins>+ characterDataModified(nodeId, characterData)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._characterDataModified(nodeId, characterData);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- childNodeCountUpdated: function(nodeId, childNodeCount)
</del><ins>+ childNodeCountUpdated(nodeId, childNodeCount)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._childNodeCountUpdated(nodeId, childNodeCount);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- childNodeInserted: function(parentNodeId, previousNodeId, payload)
</del><ins>+ childNodeInserted(parentNodeId, previousNodeId, payload)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._childNodeInserted(parentNodeId, previousNodeId, payload);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- childNodeRemoved: function(parentNodeId, nodeId)
</del><ins>+ childNodeRemoved(parentNodeId, nodeId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._childNodeRemoved(parentNodeId, nodeId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- shadowRootPushed: function(parentNodeId, nodeId)
</del><ins>+ shadowRootPushed(parentNodeId, nodeId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._childNodeInserted(parentNodeId, 0, nodeId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- shadowRootPopped: function(parentNodeId, nodeId)
</del><ins>+ shadowRootPopped(parentNodeId, nodeId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.domTreeManager._childNodeRemoved(parentNodeId, nodeId);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.DOMObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolDOMStorageObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMStorageObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMStorageObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/DOMStorageObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -24,46 +24,38 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.DOMStorageObserver = function()
</del><ins>+WebInspector.DOMStorageObserver = class DOMStorageObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.DOMStorageObserver.prototype = {
- constructor: WebInspector.DOMStorageObserver,
- __proto__: WebInspector.Object.prototype,
-
</del><span class="cx"> // Events defined by the "DOMStorage" domain.
</span><span class="cx">
</span><span class="cx"> // COMPATIBILITY (iOS 6): This event no longer exists. It is still needed and called on iOS 6.
</span><del>- addDOMStorage: function(storage)
</del><ins>+ addDOMStorage(storage)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.domStorageWasAdded(storage.id, storage.host, storage.isLocalStorage);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> // COMPATIBILITY (iOS 6): This event was split into the granular events below.
</span><del>- updateDOMStorage: function(storageId)
</del><ins>+ updateDOMStorage(storageId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.domStorageWasUpdated(storageId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- domStorageItemsCleared: function(storageId)
</del><ins>+ domStorageItemsCleared(storageId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.itemsCleared(storageId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- domStorageItemRemoved: function(storageId, key)
</del><ins>+ domStorageItemRemoved(storageId, key)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.itemRemoved(storageId, key);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- domStorageItemAdded: function(storageId, key, value)
</del><ins>+ domStorageItemAdded(storageId, key, value)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.itemAdded(storageId, key, value);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- domStorageItemUpdated: function(storageId, key, oldValue, value)
</del><ins>+ domStorageItemUpdated(storageId, key, oldValue, value)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.itemUpdated(storageId, key, oldValue, value);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolDatabaseObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/DatabaseObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/DatabaseObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/DatabaseObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,26 +23,17 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.DatabaseObserver = function()
</del><ins>+WebInspector.DatabaseObserver = class DatabaseObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.DatabaseObserver._callbacks = {};
-
-WebInspector.DatabaseObserver.prototype = {
- constructor: WebInspector.DatabaseObserver,
-
</del><span class="cx"> // Events defined by the "Database" domain.
</span><span class="cx">
</span><del>- addDatabase: function(database)
</del><ins>+ addDatabase(database)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.storageManager.databaseWasAdded(database.id, database.domain, database.name, database.version);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> // COMPATIBILITY (iOS 6): This event was removed in favor of a more async DatabaseAgent.executeSQL.
</span><del>- sqlTransactionSucceeded: function(transactionId, columnNames, values)
</del><ins>+ sqlTransactionSucceeded(transactionId, columnNames, values)
</ins><span class="cx"> {
</span><span class="cx"> if (!WebInspector.DatabaseObserver._callbacks[transactionId])
</span><span class="cx"> return;
</span><span class="lines">@@ -52,10 +43,10 @@
</span><span class="cx">
</span><span class="cx"> if (callback)
</span><span class="cx"> callback(columnNames, values, null);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> // COMPATIBILITY (iOS 6): This event was removed in favor of a more async DatabaseAgent.executeSQL.
</span><del>- sqlTransactionFailed: function(transactionId, sqlError)
</del><ins>+ sqlTransactionFailed(transactionId, sqlError)
</ins><span class="cx"> {
</span><span class="cx"> if (!WebInspector.DatabaseObserver._callbacks[transactionId])
</span><span class="cx"> return;
</span><span class="lines">@@ -68,4 +59,4 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-WebInspector.DatabaseObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del><ins>+WebInspector.DatabaseObserver._callbacks = {};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolDebuggerObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,56 +23,47 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.DebuggerObserver = function()
</del><ins>+WebInspector.DebuggerObserver = class DebuggerObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.DebuggerObserver.prototype = {
- constructor: WebInspector.DebuggerObserver,
-
</del><span class="cx"> // Events defined by the "Debugger" domain.
</span><span class="cx">
</span><del>- globalObjectCleared: function()
</del><ins>+ globalObjectCleared()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.debuggerManager.reset();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- scriptParsed: function(scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
</del><ins>+ scriptParsed(scriptId, url, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.debuggerManager.scriptDidParse(scriptId, url, isContentScript, startLine, startColumn, endLine, endColumn, sourceMapURL);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- scriptFailedToParse: function(url, scriptSource, startLine, errorLine, errorMessage)
</del><ins>+ scriptFailedToParse(url, scriptSource, startLine, errorLine, errorMessage)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- breakpointResolved: function(breakpointId, location)
</del><ins>+ breakpointResolved(breakpointId, location)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.debuggerManager.breakpointResolved(breakpointId, location);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- paused: function(callFrames, reason, data)
</del><ins>+ paused(callFrames, reason, data)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.debuggerManager.debuggerDidPause(callFrames, reason, data);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- resumed: function()
</del><ins>+ resumed()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.debuggerManager.debuggerDidResume();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- playBreakpointActionSound: function(breakpointActionIdentifier)
</del><ins>+ playBreakpointActionSound(breakpointActionIdentifier)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.debuggerManager.playBreakpointActionSound(breakpointActionIdentifier);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- didSampleProbe: function(sample)
</del><ins>+ didSampleProbe(sample)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.probeManager.didSampleProbe(sample);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.DebuggerObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolInspectorBackendjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -30,52 +30,52 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-function InspectorBackendClass()
</del><ins>+InspectorBackendClass = class InspectorBackendClass
</ins><span class="cx"> {
</span><del>- this._lastSequenceId = 1;
- this._pendingResponsesCount = 0;
- this._callbackData = new Map;
- this._agents = {};
- this._deferredScripts = [];
</del><ins>+ constructor()
+ {
+ this._lastSequenceId = 1;
+ this._pendingResponsesCount = 0;
+ this._callbackData = new Map;
+ this._agents = {};
+ this._deferredScripts = [];
</ins><span class="cx">
</span><del>- this.dumpInspectorTimeStats = false;
- this.dumpInspectorProtocolMessages = false;
- this.warnForLongMessageHandling = false;
- this.longMessageHandlingThreshold = 10; // milliseconds.
-}
</del><ins>+ this.dumpInspectorTimeStats = false;
+ this.dumpInspectorProtocolMessages = false;
+ this.warnForLongMessageHandling = false;
+ this.longMessageHandlingThreshold = 10; // milliseconds.
+ }
</ins><span class="cx">
</span><del>-InspectorBackendClass.prototype = {
-
</del><span class="cx"> // Public
</span><span class="cx">
</span><del>- registerCommand: function(qualifiedName, callSignature, replySignature)
</del><ins>+ registerCommand(qualifiedName, callSignature, replySignature)
</ins><span class="cx"> {
</span><span class="cx"> var [domainName, commandName] = qualifiedName.split(".");
</span><span class="cx"> var agent = this._agentForDomain(domainName);
</span><span class="cx"> agent.addCommand(InspectorBackend.Command.create(this, qualifiedName, callSignature, replySignature));
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- registerEnum: function(qualifiedName, enumValues)
</del><ins>+ registerEnum(qualifiedName, enumValues)
</ins><span class="cx"> {
</span><span class="cx"> var [domainName, enumName] = qualifiedName.split(".");
</span><span class="cx"> var agent = this._agentForDomain(domainName);
</span><span class="cx"> agent.addEnum(enumName, enumValues);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- registerEvent: function(qualifiedName, signature)
</del><ins>+ registerEvent(qualifiedName, signature)
</ins><span class="cx"> {
</span><span class="cx"> var [domainName, eventName] = qualifiedName.split(".");
</span><span class="cx"> var agent = this._agentForDomain(domainName);
</span><span class="cx"> agent.addEvent(new InspectorBackend.Event(eventName, signature));
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- registerDomainDispatcher: function(domainName, dispatcher)
</del><ins>+ registerDomainDispatcher(domainName, dispatcher)
</ins><span class="cx"> {
</span><span class="cx"> var agent = this._agentForDomain(domainName);
</span><span class="cx"> agent.dispatcher = dispatcher;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- dispatch: function(message)
</del><ins>+ dispatch(message)
</ins><span class="cx"> {
</span><span class="cx"> if (this.dumpInspectorProtocolMessages)
</span><span class="cx"> console.log("backend: " + ((typeof message === "string") ? message : JSON.stringify(message)));
</span><span class="lines">@@ -86,9 +86,9 @@
</span><span class="cx"> this._dispatchCallback(messageObject);
</span><span class="cx"> else
</span><span class="cx"> this._dispatchEvent(messageObject);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- runAfterPendingDispatches: function(script)
</del><ins>+ runAfterPendingDispatches(script)
</ins><span class="cx"> {
</span><span class="cx"> console.assert(script);
</span><span class="cx"> console.assert(typeof script === "function");
</span><span class="lines">@@ -97,9 +97,9 @@
</span><span class="cx"> script.call(this);
</span><span class="cx"> else
</span><span class="cx"> this._deferredScripts.push(script);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- activateDomain: function(domainName, activationDebuggableType)
</del><ins>+ activateDomain(domainName, activationDebuggableType)
</ins><span class="cx"> {
</span><span class="cx"> if (!activationDebuggableType || InspectorFrontendHost.debuggableType() === activationDebuggableType) {
</span><span class="cx"> var agent = this._agents[domainName];
</span><span class="lines">@@ -108,11 +108,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return null;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> // Private
</span><span class="cx">
</span><del>- _agentForDomain: function(domainName)
</del><ins>+ _agentForDomain(domainName)
</ins><span class="cx"> {
</span><span class="cx"> if (this._agents[domainName])
</span><span class="cx"> return this._agents[domainName];
</span><span class="lines">@@ -120,9 +120,9 @@
</span><span class="cx"> var agent = new InspectorBackend.Agent(domainName);
</span><span class="cx"> this._agents[domainName] = agent;
</span><span class="cx"> return agent;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _willSendMessageToBackend: function(command, callback)
</del><ins>+ _willSendMessageToBackend(command, callback)
</ins><span class="cx"> {
</span><span class="cx"> ++this._pendingResponsesCount;
</span><span class="cx"> var sequenceId = this._lastSequenceId++;
</span><span class="lines">@@ -140,9 +140,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return sequenceId;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _dispatchCallback: function(messageObject)
</del><ins>+ _dispatchCallback(messageObject)
</ins><span class="cx"> {
</span><span class="cx"> --this._pendingResponsesCount;
</span><span class="cx"> console.assert(this._pendingResponsesCount >= 0);
</span><span class="lines">@@ -195,9 +195,9 @@
</span><span class="cx">
</span><span class="cx"> if (this._deferredScripts.length && !this._pendingResponsesCount)
</span><span class="cx"> this._flushPendingScripts();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _dispatchEvent: function(messageObject)
</del><ins>+ _dispatchEvent(messageObject)
</ins><span class="cx"> {
</span><span class="cx"> var qualifiedName = messageObject["method"];
</span><span class="cx"> var [domainName, eventName] = qualifiedName.split(".");
</span><span class="lines">@@ -241,9 +241,9 @@
</span><span class="cx">
</span><span class="cx"> if (this.dumpInspectorTimeStats)
</span><span class="cx"> console.log("time-stats: Handling: " + processingDuration + "ms (event " + messageObject["method"] + ")");
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _invokeCommand: function(command, parameters, callback)
</del><ins>+ _invokeCommand(command, parameters, callback)
</ins><span class="cx"> {
</span><span class="cx"> var messageObject = {};
</span><span class="cx"> messageObject["method"] = command.qualifiedName;
</span><span class="lines">@@ -260,14 +260,14 @@
</span><span class="cx"> console.log("frontend: " + stringifiedMessage);
</span><span class="cx">
</span><span class="cx"> InspectorFrontendHost.sendMessageToBackend(stringifiedMessage);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _reportProtocolError: function(messageObject)
</del><ins>+ _reportProtocolError(messageObject)
</ins><span class="cx"> {
</span><span class="cx"> console.error("Request with id = " + messageObject["id"] + " failed. " + JSON.stringify(messageObject["error"]));
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _flushPendingScripts: function()
</del><ins>+ _flushPendingScripts()
</ins><span class="cx"> {
</span><span class="cx"> console.assert(!this._pendingResponsesCount);
</span><span class="cx">
</span><span class="lines">@@ -276,71 +276,74 @@
</span><span class="cx"> for (var script of scriptsToRun)
</span><span class="cx"> script.call(this);
</span><span class="cx"> }
</span><del>-}
</del><ins>+};
</ins><span class="cx">
</span><del>-InspectorBackend = new InspectorBackendClass();
</del><ins>+InspectorBackend = new InspectorBackendClass;
</ins><span class="cx">
</span><del>-InspectorBackend.Agent = function(domainName)
</del><ins>+InspectorBackend.Agent = class InspectorBackendAgent
</ins><span class="cx"> {
</span><del>- this._domainName = domainName;
</del><ins>+ constructor(domainName)
+ {
+ this._domainName = domainName;
</ins><span class="cx">
</span><del>- // Agents are always created, but are only useable after they are activated.
- this._active = false;
</del><ins>+ // Agents are always created, but are only useable after they are activated.
+ this._active = false;
</ins><span class="cx">
</span><del>- // Commands are stored directly on the Agent instance using their unqualified
- // method name as the property. Thus, callers can write: FooAgent.methodName().
- // Enums are stored similarly based on the unqualified type name.
- this._events = {};
-}
</del><ins>+ // Commands are stored directly on the Agent instance using their unqualified
+ // method name as the property. Thus, callers can write: FooAgent.methodName().
+ // Enums are stored similarly based on the unqualified type name.
+ this._events = {};
+ }
</ins><span class="cx">
</span><del>-InspectorBackend.Agent.prototype = {
</del><ins>+ // Public
+
</ins><span class="cx"> get domainName()
</span><span class="cx"> {
</span><span class="cx"> return this._domainName;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get active()
</span><span class="cx"> {
</span><span class="cx"> return this._active;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> set dispatcher(value)
</span><span class="cx"> {
</span><span class="cx"> this._dispatcher = value;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- addEnum: function(enumName, enumValues)
</del><ins>+ addEnum(enumName, enumValues)
</ins><span class="cx"> {
</span><span class="cx"> this[enumName] = enumValues;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- addCommand: function(command)
</del><ins>+ addCommand(command)
</ins><span class="cx"> {
</span><span class="cx"> this[command.commandName] = command;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- addEvent: function(event)
</del><ins>+ addEvent(event)
</ins><span class="cx"> {
</span><span class="cx"> this._events[event.eventName] = event;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- getEvent: function(eventName)
</del><ins>+ getEvent(eventName)
</ins><span class="cx"> {
</span><span class="cx"> return this._events[eventName];
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- hasEvent: function(eventName)
</del><ins>+ hasEvent(eventName)
</ins><span class="cx"> {
</span><span class="cx"> return eventName in this._events;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- activate: function()
</del><ins>+ activate()
</ins><span class="cx"> {
</span><span class="cx"> this._active = true;
</span><span class="cx"> window[this._domainName + "Agent"] = this;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- dispatchEvent: function(eventName, eventArguments)
</del><ins>+ dispatchEvent(eventName, eventArguments)
</ins><span class="cx"> {
</span><span class="cx"> if (!(eventName in this._dispatcher)) {
</span><span class="cx"> console.error("Protocol Error: Attempted to dispatch an unimplemented method '" + this._domainName + "." + eventName + "'");
</span><span class="lines">@@ -350,10 +353,14 @@
</span><span class="cx"> this._dispatcher[eventName].apply(this._dispatcher, eventArguments);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><del>-}
</del><ins>+};
</ins><span class="cx">
</span><ins>+// InspectorBackend.Command can't use ES6 classes because of its trampoline nature.
+// But we can use strict mode to get stricter handling of the code inside its functions.
</ins><span class="cx"> InspectorBackend.Command = function(backend, qualifiedName, callSignature, replySignature)
</span><span class="cx"> {
</span><ins>+ 'use strict';
+
</ins><span class="cx"> this._backend = backend;
</span><span class="cx"> this._instance = this;
</span><span class="cx">
</span><span class="lines">@@ -362,23 +369,26 @@
</span><span class="cx"> this._commandName = commandName;
</span><span class="cx"> this._callSignature = callSignature || [];
</span><span class="cx"> this._replySignature = replySignature || [];
</span><del>-}
</del><ins>+};
</ins><span class="cx">
</span><span class="cx"> InspectorBackend.Command.create = function(backend, commandName, callSignature, replySignature)
</span><span class="cx"> {
</span><ins>+ 'use strict';
+
</ins><span class="cx"> var instance = new InspectorBackend.Command(backend, commandName, callSignature, replySignature);
</span><span class="cx">
</span><span class="cx"> function callable() {
</span><span class="cx"> // If the last argument to the command is not a function, return a result promise.
</span><span class="cx"> if (!arguments.length || typeof arguments[arguments.length - 1] !== "function")
</span><span class="cx"> return instance.promise.apply(instance, arguments);
</span><del>-
</del><span class="cx"> return instance._invokeWithArguments.apply(instance, arguments);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> callable._instance = instance;
</span><span class="cx"> callable.__proto__ = InspectorBackend.Command.prototype;
</span><ins>+
</ins><span class="cx"> return callable;
</span><del>-}
</del><ins>+};
</ins><span class="cx">
</span><span class="cx"> // As part of the workaround to make commands callable, these functions use |this._instance|.
</span><span class="cx"> // |this| could refer to the callable trampoline, or the InspectorBackend.Command instance.
</span><span class="lines">@@ -409,18 +419,23 @@
</span><span class="cx">
</span><span class="cx"> invoke: function(commandArguments, callback)
</span><span class="cx"> {
</span><ins>+ 'use strict';
+
</ins><span class="cx"> var instance = this._instance;
</span><span class="cx"> instance._backend._invokeCommand(instance, commandArguments, callback);
</span><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> promise: function()
</span><span class="cx"> {
</span><ins>+ 'use strict';
+
</ins><span class="cx"> var instance = this._instance;
</span><span class="cx"> var promiseArguments = Array.from(arguments);
</span><span class="cx"> return new Promise(function(resolve, reject) {
</span><span class="cx"> function convertToPromiseCallback(error, payload) {
</span><span class="cx"> return error ? reject(error) : resolve(payload);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> // FIXME: this should be indicated by invoking the command differently, rather
</span><span class="cx"> // than by setting a magical property on the callback. <webkit.org/b/132386>
</span><span class="cx"> convertToPromiseCallback.expectsResultObject = true;
</span><span class="lines">@@ -432,6 +447,8 @@
</span><span class="cx">
</span><span class="cx"> supports: function(parameterName)
</span><span class="cx"> {
</span><ins>+ 'use strict';
+
</ins><span class="cx"> var instance = this._instance;
</span><span class="cx"> return instance.callSignature.some(function(parameter) {
</span><span class="cx"> return parameter["name"] === parameterName;
</span><span class="lines">@@ -442,6 +459,8 @@
</span><span class="cx">
</span><span class="cx"> _invokeWithArguments: function()
</span><span class="cx"> {
</span><ins>+ 'use strict';
+
</ins><span class="cx"> var instance = this._instance;
</span><span class="cx"> var commandArguments = Array.from(arguments);
</span><span class="cx"> var callback = typeof commandArguments.lastValue === "function" ? commandArguments.pop() : null;
</span><span class="lines">@@ -478,11 +497,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> instance._backend._invokeCommand(instance, Object.keys(parameters).length ? parameters : null, callback);
</span><del>- },
-}
</del><ins>+ }
+};
</ins><span class="cx">
</span><del>-InspectorBackend.Event = function(eventName, parameterNames)
</del><ins>+InspectorBackend.Event = class Event
</ins><span class="cx"> {
</span><del>- this.eventName = eventName;
- this.parameterNames = parameterNames;
-}
</del><ins>+ constructor(eventName, parameterNames)
+ {
+ this.eventName = eventName;
+ this.parameterNames = parameterNames;
+ }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolInspectorObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,18 +23,11 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.InspectorObserver = function()
</del><ins>+WebInspector.InspectorObserver = class InspectorObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.InspectorObserver.prototype = {
- constructor: WebInspector.InspectorObserver,
-
</del><span class="cx"> // Events defined by the "Inspector" domain.
</span><span class="cx">
</span><del>- evaluateForTestInFrontend: function(script)
</del><ins>+ evaluateForTestInFrontend(script)
</ins><span class="cx"> {
</span><span class="cx"> if (!InspectorFrontendHost.isUnderTest())
</span><span class="cx"> return;
</span><span class="lines">@@ -42,9 +35,9 @@
</span><span class="cx"> InspectorBackend.runAfterPendingDispatches(function() {
</span><span class="cx"> window.eval(script);
</span><span class="cx"> });
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- inspect: function(payload, hints)
</del><ins>+ inspect(payload, hints)
</ins><span class="cx"> {
</span><span class="cx"> var remoteObject = WebInspector.RemoteObject.fromPayload(payload);
</span><span class="cx"> if (remoteObject.subtype === "node") {
</span><span class="lines">@@ -61,17 +54,15 @@
</span><span class="cx"> WebInspector.navigationSidebar.selectedSidebarPanel = WebInspector.resourceSidebarPanel;
</span><span class="cx">
</span><span class="cx"> remoteObject.release();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- detached: function(reason)
</del><ins>+ detached(reason)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- activateExtraDomains: function(domains)
</del><ins>+ activateExtraDomains(domains)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.activateExtraDomains(domains);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.InspectorObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolLayerTreeObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/LayerTreeObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/LayerTreeObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/LayerTreeObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -17,28 +17,19 @@
</span><span class="cx"> * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
</span><span class="cx"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
</span><span class="cx"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
</span><del>- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
</del><ins>+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OdF LIABILITY, WHETHER IN
</ins><span class="cx"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
</span><span class="cx"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.LayerTreeObserver = function()
</del><ins>+WebInspector.LayerTreeObserver = class LayerTreeObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.LayerTreeObserver.prototype = {
- constructor: WebInspector.LayerTreeObserver,
-
</del><span class="cx"> // Events defined by the "LayerTree" domain.
</span><span class="cx">
</span><del>- layerTreeDidChange: function()
</del><ins>+ layerTreeDidChange()
</ins><span class="cx"> {
</span><span class="cx"> if (WebInspector.layerTreeManager.supported)
</span><span class="cx"> WebInspector.layerTreeManager.layerTreeDidChange();
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.LayerTreeObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolMessageDispatcherjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/MessageDispatcher.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2014 University of Washington
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -24,34 +24,34 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.messagesToDispatch = [];
</del><ins>+WebInspector._messagesToDispatch = [];
</ins><span class="cx">
</span><span class="cx"> WebInspector.dispatchNextQueuedMessageFromBackend = function()
</span><span class="cx"> {
</span><del>- var startCount = WebInspector.messagesToDispatch.length;
</del><ins>+ var startCount = WebInspector._messagesToDispatch.length;
</ins><span class="cx"> var startTime = Date.now();
</span><span class="cx"> var timeLimitPerRunLoop = 10; // milliseconds
</span><span class="cx">
</span><span class="cx"> var i = 0;
</span><del>- for (; i < WebInspector.messagesToDispatch.length; ++i) {
</del><ins>+ for (; i < WebInspector._messagesToDispatch.length; ++i) {
</ins><span class="cx"> // Defer remaining messages if we have taken too long. In practice, single
</span><span class="cx"> // messages like Page.getResourceContent blow through the time budget.
</span><span class="cx"> if (Date.now() - startTime > timeLimitPerRunLoop)
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- InspectorBackend.dispatch(WebInspector.messagesToDispatch[i]);
</del><ins>+ InspectorBackend.dispatch(WebInspector._messagesToDispatch[i]);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (i === WebInspector.messagesToDispatch.length) {
- WebInspector.messagesToDispatch = [];
</del><ins>+ if (i === WebInspector._messagesToDispatch.length) {
+ WebInspector._messagesToDispatch = [];
</ins><span class="cx"> WebInspector._dispatchTimeout = null;
</span><span class="cx"> } else {
</span><del>- WebInspector.messagesToDispatch = WebInspector.messagesToDispatch.slice(i);
</del><ins>+ WebInspector._messagesToDispatch = WebInspector._messagesToDispatch.slice(i);
</ins><span class="cx"> WebInspector._dispatchTimeout = setTimeout(WebInspector.dispatchNextQueuedMessageFromBackend, 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (InspectorBackend.dumpInspectorTimeStats)
</span><del>- console.log("time-stats: --- RunLoop duration: " + (Date.now() - startTime) + "ms; dispatched: " + (startCount - WebInspector.messagesToDispatch.length) + "; remaining: " + WebInspector.messagesToDispatch.length);
</del><ins>+ console.log("time-stats: --- RunLoop duration: " + (Date.now() - startTime) + "ms; dispatched: " + (startCount - WebInspector._messagesToDispatch.length) + "; remaining: " + WebInspector._messagesToDispatch.length);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector.dispatchMessageFromBackend = function(message)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> // Enforce asynchronous interaction between the backend and the frontend by queueing messages.
</span><span class="cx"> // The messages are dequeued on a zero delay timeout.
</span><span class="cx">
</span><del>- this.messagesToDispatch.push(message);
</del><ins>+ WebInspector._messagesToDispatch.push(message);
</ins><span class="cx">
</span><span class="cx"> if (this._dispatchTimeout)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolNetworkObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/NetworkObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/NetworkObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/NetworkObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,86 +23,77 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.NetworkObserver = function()
</del><ins>+WebInspector.NetworkObserver = class NetworkObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.NetworkObserver.prototype = {
- constructor: WebInspector.NetworkObserver,
-
</del><span class="cx"> // Events defined by the "Network" domain.
</span><span class="cx">
</span><del>- requestWillBeSent: function(requestId, frameId, loaderId, documentURL, request, timestamp, initiator, redirectResponse, type)
</del><ins>+ requestWillBeSent(requestId, frameId, loaderId, documentURL, request, timestamp, initiator, redirectResponse, type)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.resourceRequestWillBeSent(requestId, frameId, loaderId, request, type, redirectResponse, timestamp, initiator);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- requestServedFromCache: function(requestId)
</del><ins>+ requestServedFromCache(requestId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.markResourceRequestAsServedFromMemoryCache(requestId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- responseReceived: function(requestId, frameId, loaderId, timestamp, type, response)
</del><ins>+ responseReceived(requestId, frameId, loaderId, timestamp, type, response)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.resourceRequestDidReceiveResponse(requestId, frameId, loaderId, type, response, timestamp);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- dataReceived: function(requestId, timestamp, dataLength, encodedDataLength)
</del><ins>+ dataReceived(requestId, timestamp, dataLength, encodedDataLength)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.resourceRequestDidReceiveData(requestId, dataLength, encodedDataLength, timestamp);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- loadingFinished: function(requestId, timestamp, sourceMapURL)
</del><ins>+ loadingFinished(requestId, timestamp, sourceMapURL)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.resourceRequestDidFinishLoading(requestId, timestamp, sourceMapURL);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- loadingFailed: function(requestId, timestamp, errorText, canceled)
</del><ins>+ loadingFailed(requestId, timestamp, errorText, canceled)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.resourceRequestDidFailLoading(requestId, canceled, timestamp);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- requestServedFromMemoryCache: function(requestId, frameId, loaderId, documentURL, timestamp, initiator, resource)
</del><ins>+ requestServedFromMemoryCache(requestId, frameId, loaderId, documentURL, timestamp, initiator, resource)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.resourceRequestWasServedFromMemoryCache(requestId, frameId, loaderId, resource, timestamp, initiator);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketWillSendHandshakeRequest: function(requestId, timestamp, request)
</del><ins>+ webSocketWillSendHandshakeRequest(requestId, timestamp, request)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketHandshakeResponseReceived: function(requestId, timestamp, response)
</del><ins>+ webSocketHandshakeResponseReceived(requestId, timestamp, response)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketCreated: function(requestId, url)
</del><ins>+ webSocketCreated(requestId, url)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketClosed: function(requestId, timestamp)
</del><ins>+ webSocketClosed(requestId, timestamp)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketFrameReceived: function(requestId, timestamp, response)
</del><ins>+ webSocketFrameReceived(requestId, timestamp, response)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketFrameError: function(requestId, timestamp, errorMessage)
</del><ins>+ webSocketFrameError(requestId, timestamp, errorMessage)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- webSocketFrameSent: function(requestId, timestamp, response)
</del><ins>+ webSocketFrameSent(requestId, timestamp, response)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Not implemented.
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.NetworkObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolPageObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,71 +23,62 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.PageObserver = function()
</del><ins>+WebInspector.PageObserver = class PageObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.PageObserver.prototype = {
- constructor: WebInspector.PageObserver,
-
</del><span class="cx"> // Events defined by the "Page" domain.
</span><span class="cx">
</span><del>- domContentEventFired: function(timestamp)
</del><ins>+ domContentEventFired(timestamp)
</ins><span class="cx"> {
</span><span class="cx"> // Covered by Timeline "MarkDOMContent" record.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- loadEventFired: function(timestamp)
</del><ins>+ loadEventFired(timestamp)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.timelineManager.pageDidLoad(timestamp);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- frameNavigated: function(frame, loaderId)
</del><ins>+ frameNavigated(frame, loaderId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.frameDidNavigate(frame, loaderId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- frameDetached: function(frameId)
</del><ins>+ frameDetached(frameId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.frameDidDetach(frameId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- frameStartedLoading: function(frameId)
</del><ins>+ frameStartedLoading(frameId)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- frameStoppedLoading: function(frameId)
</del><ins>+ frameStoppedLoading(frameId)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- frameScheduledNavigation: function(frameId, delay)
</del><ins>+ frameScheduledNavigation(frameId, delay)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- frameClearedScheduledNavigation: function(frameId)
</del><ins>+ frameClearedScheduledNavigation(frameId)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- javascriptDialogOpening: function(message)
</del><ins>+ javascriptDialogOpening(message)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- javascriptDialogClosed: function()
</del><ins>+ javascriptDialogClosed()
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- scriptsEnabled: function(enabled)
</del><ins>+ scriptsEnabled(enabled)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.PageObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2009 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -28,172 +29,174 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.RemoteObject = function(objectId, type, subtype, value, description, size, preview)
</del><ins>+WebInspector.RemoteObject = class RemoteObject
</ins><span class="cx"> {
</span><del>- // No superclass.
</del><ins>+ constructor(objectId, type, subtype, value, description, size, preview)
+ {
+ console.assert(type);
+ console.assert(!preview || preview instanceof WebInspector.ObjectPreview);
</ins><span class="cx">
</span><del>- console.assert(type);
- console.assert(!preview || preview instanceof WebInspector.ObjectPreview);
</del><ins>+ this._type = type;
+ this._subtype = subtype;
</ins><span class="cx">
</span><del>- this._type = type;
- this._subtype = subtype;
</del><ins>+ if (objectId) {
+ // Object or Symbol.
+ console.assert(!subtype || typeof subtype === "string");
+ console.assert(!description || typeof description === "string");
+ console.assert(!value);
</ins><span class="cx">
</span><del>- if (objectId) {
- // Object or Symbol.
- console.assert(!subtype || typeof subtype === "string");
- console.assert(!description || typeof description === "string");
- console.assert(!value);
</del><ins>+ this._objectId = objectId;
+ this._description = description;
+ this._hasChildren = type !== "symbol";
+ this._size = size;
+ this._preview = preview;
+ } else {
+ // Primitive or null.
+ console.assert(type !== "object" || value === null);
+ console.assert(!preview);
</ins><span class="cx">
</span><del>- this._objectId = objectId;
- this._description = description;
- this._hasChildren = type !== "symbol";
- this._size = size;
- this._preview = preview;
- } else {
- // Primitive or null.
- console.assert(type !== "object" || value === null);
- console.assert(!preview);
</del><ins>+ this._description = description || (value + "");
+ this._hasChildren = false;
+ this._value = value;
+ }
+ }
</ins><span class="cx">
</span><del>- this._description = description || (value + "");
- this._hasChildren = false;
- this._value = value;
</del><ins>+ // Static
+
+ static fromPrimitiveValue(value)
+ {
+ return new WebInspector.RemoteObject(undefined, typeof value, undefined, undefined, value);
</ins><span class="cx"> }
</span><del>-};
</del><span class="cx">
</span><del>-WebInspector.RemoteObject.fromPrimitiveValue = function(value)
-{
- return new WebInspector.RemoteObject(undefined, typeof value, undefined, undefined, value);
-};
</del><ins>+ static fromPayload(payload)
+ {
+ console.assert(typeof payload === "object", "Remote object payload should only be an object");
</ins><span class="cx">
</span><del>-WebInspector.RemoteObject.fromPayload = function(payload)
-{
- console.assert(typeof payload === "object", "Remote object payload should only be an object");
</del><ins>+ if (payload.subtype === "array") {
+ // COMPATIBILITY (iOS 8): Runtime.RemoteObject did not have size property,
+ // instead it was tacked onto the end of the description, like "Array[#]".
+ var match = payload.description.match(/\[(\d+)\]$/);
+ if (match) {
+ payload.size = parseInt(match[1]);
+ payload.description = payload.description.replace(/\[\d+\]$/, "");
+ }
+ }
</ins><span class="cx">
</span><del>- if (payload.subtype === "array") {
- // COMPATIBILITY (iOS 8): Runtime.RemoteObject did not have size property,
- // instead it was tacked onto the end of the description, like "Array[#]".
- var match = payload.description.match(/\[(\d+)\]$/);
- if (match) {
- payload.size = parseInt(match[1]);
- payload.description = payload.description.replace(/\[\d+\]$/, "");
</del><ins>+ if (payload.preview) {
+ // COMPATIBILITY (iOS 8): iOS 7 and 8 did not have type/subtype/description on
+ // Runtime.ObjectPreview. Copy them over from the RemoteObject.
+ if (!payload.preview.type) {
+ payload.preview.type = payload.type;
+ payload.preview.subtype = payload.subtype;
+ payload.preview.description = payload.description;
+ payload.preview.size = payload.size;
+ }
+
+ payload.preview = WebInspector.ObjectPreview.fromPayload(payload.preview);
</ins><span class="cx"> }
</span><ins>+
+ return new WebInspector.RemoteObject(payload.objectId, payload.type, payload.subtype, payload.value, payload.description, payload.size, payload.preview);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (payload.preview) {
- // COMPATIBILITY (iOS 8): iOS 7 and 8 did not have type/subtype/description on
- // Runtime.ObjectPreview. Copy them over from the RemoteObject.
- if (!payload.preview.type) {
- payload.preview.type = payload.type;
- payload.preview.subtype = payload.subtype;
- payload.preview.description = payload.description;
- payload.preview.size = payload.size;
</del><ins>+ static createCallArgument(valueOrObject)
+ {
+ if (valueOrObject instanceof WebInspector.RemoteObject) {
+ if (valueOrObject.objectId)
+ return {objectId: valueOrObject.objectId};
+ return {value: valueOrObject.value};
</ins><span class="cx"> }
</span><del>- payload.preview = WebInspector.ObjectPreview.fromPayload(payload.preview);
</del><ins>+
+ return {value: valueOrObject};
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return new WebInspector.RemoteObject(payload.objectId, payload.type, payload.subtype, payload.value, payload.description, payload.size, payload.preview);
-};
</del><ins>+ static resolveNode(node, objectGroup, callback)
+ {
+ DOMAgent.resolveNode(node.id, objectGroup, function(error, object) {
+ if (!callback)
+ return;
</ins><span class="cx">
</span><del>-WebInspector.RemoteObject.createCallArgument = function(valueOrObject)
-{
- if (valueOrObject instanceof WebInspector.RemoteObject) {
- if (valueOrObject.objectId)
- return {objectId: valueOrObject.objectId};
- return {value: valueOrObject.value};
</del><ins>+ if (error || !object)
+ callback(null);
+ else
+ callback(WebInspector.RemoteObject.fromPayload(object));
+ });
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return {value: valueOrObject};
-};
</del><ins>+ static type(remoteObject)
+ {
+ if (remoteObject === null)
+ return "null";
</ins><span class="cx">
</span><del>-WebInspector.RemoteObject.resolveNode = function(node, objectGroup, callback)
-{
- DOMAgent.resolveNode(node.id, objectGroup, function(error, object) {
- if (!callback)
- return;
</del><ins>+ var type = typeof remoteObject;
+ if (type !== "object" && type !== "function")
+ return type;
</ins><span class="cx">
</span><del>- if (error || !object)
- callback(null);
- else
- callback(WebInspector.RemoteObject.fromPayload(object));
- });
-};
</del><ins>+ return remoteObject.type;
+ }
</ins><span class="cx">
</span><del>-WebInspector.RemoteObject.type = function(remoteObject)
-{
- if (remoteObject === null)
- return "null";
</del><ins>+ // Public
</ins><span class="cx">
</span><del>- var type = typeof remoteObject;
- if (type !== "object" && type !== "function")
- return type;
-
- return remoteObject.type;
-};
-
-WebInspector.RemoteObject.prototype = {
- constructor: WebInspector.RemoteObject,
-
</del><span class="cx"> get objectId()
</span><span class="cx"> {
</span><span class="cx"> return this._objectId;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get type()
</span><span class="cx"> {
</span><span class="cx"> return this._type;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get subtype()
</span><span class="cx"> {
</span><span class="cx"> return this._subtype;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get description()
</span><span class="cx"> {
</span><span class="cx"> return this._description;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get hasChildren()
</span><span class="cx"> {
</span><span class="cx"> return this._hasChildren;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get value()
</span><span class="cx"> {
</span><span class="cx"> return this._value;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get size()
</span><span class="cx"> {
</span><span class="cx"> return this._size || 0;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> get preview()
</span><span class="cx"> {
</span><span class="cx"> return this._preview;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- hasSize: function()
</del><ins>+ hasSize()
</ins><span class="cx"> {
</span><span class="cx"> return this.isArray() || this.isCollectionType();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- hasValue: function()
</del><ins>+ hasValue()
</ins><span class="cx"> {
</span><span class="cx"> return "_value" in this;
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- getOwnPropertyDescriptors: function(callback)
</del><ins>+ getOwnPropertyDescriptors(callback)
</ins><span class="cx"> {
</span><span class="cx"> this._getPropertyDescriptors(true, callback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- getAllPropertyDescriptors: function(callback)
</del><ins>+ getAllPropertyDescriptors(callback)
</ins><span class="cx"> {
</span><span class="cx"> this._getPropertyDescriptors(false, callback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- getDisplayablePropertyDescriptors: function(callback)
</del><ins>+ getDisplayablePropertyDescriptors(callback)
</ins><span class="cx"> {
</span><span class="cx"> if (!this._objectId || this._isSymbol()) {
</span><span class="cx"> callback([]);
</span><span class="lines">@@ -220,74 +223,33 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> this._getPropertyDescriptorsResolver(callback, error, ownOrGetterPropertiesList);
</span><span class="cx"> }.bind(this));
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RuntimeAgent.getDisplayableProperties(this._objectId, true, this._getPropertyDescriptorsResolver.bind(this, callback));
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _getPropertyDescriptors: function(ownProperties, callback)
</del><ins>+ // FIXME: Phase out these deprecated functions. They return DeprecatedRemoteObjectProperty instead of PropertyDescriptors.
+ deprecatedGetOwnProperties(callback)
</ins><span class="cx"> {
</span><del>- if (!this._objectId || this._isSymbol()) {
- callback([]);
- return;
- }
-
-
- RuntimeAgent.getProperties(this._objectId, ownProperties, true, this._getPropertyDescriptorsResolver.bind(this, callback));
- },
-
- _getPropertyDescriptorsResolver: function(callback, error, properties, internalProperties)
- {
- if (error) {
- callback(null);
- return;
- }
-
- var descriptors = properties.map(function(payload) {
- return WebInspector.PropertyDescriptor.fromPayload(payload);
- });
-
- if (internalProperties) {
- descriptors = descriptors.concat(internalProperties.map(function(payload) {
- return WebInspector.PropertyDescriptor.fromPayload(payload, true);
- }));
- }
-
- callback(descriptors);
- },
-
- // FIXME: Phase out these functions. They return RemoteObjectProperty instead of PropertyDescriptors.
-
- deprecatedGetOwnProperties: function(callback)
- {
</del><span class="cx"> this._deprecatedGetProperties(true, callback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- deprecatedGetAllProperties: function(callback)
</del><ins>+ deprecatedGetAllProperties(callback)
</ins><span class="cx"> {
</span><span class="cx"> this._deprecatedGetProperties(false, callback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _deprecatedGetProperties: function(ownProperties, callback)
</del><ins>+ deprecatedGetDisplayableProperties(callback)
</ins><span class="cx"> {
</span><span class="cx"> if (!this._objectId || this._isSymbol()) {
</span><span class="cx"> callback([]);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RuntimeAgent.getProperties(this._objectId, ownProperties, this._deprecatedGetPropertiesResolver.bind(this, callback));
- },
-
- deprecatedGetDisplayableProperties: function(callback)
- {
- if (!this._objectId || this._isSymbol()) {
- callback([]);
- return;
- }
-
</del><span class="cx"> // COMPATIBILITY (iOS 8): RuntimeAgent.getProperties did not support ownerAndGetterProperties.
</span><span class="cx"> // Here we do our best to reimplement it by getting all properties and reducing them down.
</span><span class="cx"> if (!RuntimeAgent.getDisplayableProperties) {
</span><span class="lines">@@ -307,47 +269,17 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> this._deprecatedGetPropertiesResolver(callback, error, ownOrGetterPropertiesList);
</span><span class="cx"> }.bind(this));
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RuntimeAgent.getDisplayableProperties(this._objectId, this._deprecatedGetPropertiesResolver.bind(this, callback));
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _deprecatedGetPropertiesResolver: function(callback, error, properties, internalProperties)
</del><ins>+ setPropertyValue(name, value, callback)
</ins><span class="cx"> {
</span><del>- if (error) {
- callback(null);
- return;
- }
-
- if (internalProperties) {
- properties = properties.concat(internalProperties.map(function(descriptor) {
- descriptor.writable = false;
- descriptor.configurable = false;
- descriptor.enumerable = false;
- descriptor.isOwn = true;
- return descriptor;
- }));
- }
-
- var result = [];
- for (var i = 0; properties && i < properties.length; ++i) {
- var property = properties[i];
- if (property.get || property.set) {
- if (property.get)
- result.push(new WebInspector.RemoteObjectProperty("get " + property.name, WebInspector.RemoteObject.fromPayload(property.get), property));
- if (property.set)
- result.push(new WebInspector.RemoteObjectProperty("set " + property.name, WebInspector.RemoteObject.fromPayload(property.set), property));
- } else
- result.push(new WebInspector.RemoteObjectProperty(property.name, WebInspector.RemoteObject.fromPayload(property.value), property));
- }
- callback(result);
- },
-
- setPropertyValue: function(name, value, callback)
- {
</del><span class="cx"> if (!this._objectId || this._isSymbol()) {
</span><span class="cx"> callback("Can't set a property of non-object.");
</span><span class="cx"> return;
</span><span class="lines">@@ -368,7 +300,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> delete result.description; // Optimize on traffic.
</span><del>- RuntimeAgent.callFunctionOn(this._objectId, setPropertyValue.toString(), [{ value:name }, result], true, undefined, propertySetCallback.bind(this));
</del><ins>+
+ RuntimeAgent.callFunctionOn(this._objectId, setPropertyValue.toString(), [{value:name}, result], true, undefined, propertySetCallback.bind(this));
+
</ins><span class="cx"> if (result._objectId)
</span><span class="cx"> RuntimeAgent.releaseObject(result._objectId);
</span><span class="cx"> }
</span><span class="lines">@@ -379,31 +313,27 @@
</span><span class="cx"> callback(error || result.description);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> callback();
</span><span class="cx"> }
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- _isSymbol: function()
</del><ins>+ isArray()
</ins><span class="cx"> {
</span><del>- return this._type === "symbol";
- },
-
- isArray: function()
- {
</del><span class="cx"> return this._subtype === "array";
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- isCollectionType: function()
</del><ins>+ isCollectionType()
</ins><span class="cx"> {
</span><span class="cx"> return this._subtype === "map" || this._subtype === "set" || this._subtype === "weakmap";
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- isWeakCollection: function()
</del><ins>+ isWeakCollection()
</ins><span class="cx"> {
</span><span class="cx"> return this._subtype === "weakmap";
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- getCollectionEntries: function(start, numberToFetch, callback)
</del><ins>+ getCollectionEntries(start, numberToFetch, callback)
</ins><span class="cx"> {
</span><span class="cx"> start = typeof start === "number" ? start : 0;
</span><span class="cx"> numberToFetch = typeof numberToFetch === "number" ? numberToFetch : 100;
</span><span class="lines">@@ -421,24 +351,24 @@
</span><span class="cx"> entries = entries.map(function(entry) { return WebInspector.CollectionEntry.fromPayload(entry); });
</span><span class="cx"> callback(entries);
</span><span class="cx"> });
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- releaseWeakCollectionEntries: function()
</del><ins>+ releaseWeakCollectionEntries()
</ins><span class="cx"> {
</span><span class="cx"> console.assert(this.isWeakCollection());
</span><span class="cx">
</span><span class="cx"> RuntimeAgent.releaseObjectGroup(this._weakCollectionObjectGroup());
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- pushNodeToFrontend: function(callback)
</del><ins>+ pushNodeToFrontend(callback)
</ins><span class="cx"> {
</span><span class="cx"> if (this._objectId)
</span><span class="cx"> WebInspector.domTreeManager.pushNodeToFrontend(this._objectId, callback);
</span><span class="cx"> else
</span><span class="cx"> callback(0);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- callFunction: function(functionDeclaration, args, generatePreview, callback)
</del><ins>+ callFunction(functionDeclaration, args, generatePreview, callback)
</ins><span class="cx"> {
</span><span class="cx"> function mycallback(error, result, wasThrown)
</span><span class="cx"> {
</span><span class="lines">@@ -450,9 +380,9 @@
</span><span class="cx"> args = args.map(WebInspector.RemoteObject.createCallArgument);
</span><span class="cx">
</span><span class="cx"> RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, undefined, generatePreview, mycallback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- callFunctionJSON: function(functionDeclaration, args, callback)
</del><ins>+ callFunctionJSON(functionDeclaration, args, callback)
</ins><span class="cx"> {
</span><span class="cx"> function mycallback(error, result, wasThrown)
</span><span class="cx"> {
</span><span class="lines">@@ -460,9 +390,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RuntimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, true, mycallback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- invokeGetter: function(getterRemoteObject, callback)
</del><ins>+ invokeGetter(getterRemoteObject, callback)
</ins><span class="cx"> {
</span><span class="cx"> console.assert(getterRemoteObject instanceof WebInspector.RemoteObject);
</span><span class="cx">
</span><span class="lines">@@ -472,41 +402,38 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> this.callFunction(backendInvokeGetter, [getterRemoteObject], true, callback);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- getOwnPropertyDescriptor: function(propertyName, callback)
</del><ins>+ getOwnPropertyDescriptor(propertyName, callback)
</ins><span class="cx"> {
</span><del>- if (!RuntimeAgent.getOwnPropertyDescriptor) {
- function backendGetOwnPropertyDescriptor(propertyName)
- {
- return this[propertyName];
- }
</del><ins>+ function backendGetOwnPropertyDescriptor(propertyName)
+ {
+ return this[propertyName];
+ }
</ins><span class="cx">
</span><del>- function wrappedCallback(error, result, wasThrown)
- {
- if (error || wasThrown || !(result instanceof WebInspector.RemoteObject)) {
- callback(null);
- return;
- }
-
- var fakeDescriptor = {name: propertyName, value: result, writable: true, configurable: true, enumerable: false};
- var fakePropertyDescriptor = new WebInspector.PropertyDescriptor(fakeDescriptor, true, false, false, false);
- callback(fakePropertyDescriptor);
</del><ins>+ function wrappedCallback(error, result, wasThrown)
+ {
+ if (error || wasThrown || !(result instanceof WebInspector.RemoteObject)) {
+ callback(null);
+ return;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- this.callFunction(backendGetOwnPropertyDescriptor, [propertyName], false, wrappedCallback);
</del><ins>+ var fakeDescriptor = {name: propertyName, value: result, writable: true, configurable: true, enumerable: false};
+ var fakePropertyDescriptor = new WebInspector.PropertyDescriptor(fakeDescriptor, true, false, false, false);
+ callback(fakePropertyDescriptor);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- // FIXME: Implement a real getOwnPropertyDescriptor?
- },
</del><ins>+ // FIXME: Implement a real RuntimeAgent.getOwnPropertyDescriptor?
+ this.callFunction(backendGetOwnPropertyDescriptor, [propertyName], false, wrappedCallback);
+ }
</ins><span class="cx">
</span><del>- release: function()
</del><ins>+ release()
</ins><span class="cx"> {
</span><span class="cx"> if (this._objectId)
</span><span class="cx"> RuntimeAgent.releaseObject(this._objectId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- arrayLength: function()
</del><ins>+ arrayLength()
</ins><span class="cx"> {
</span><span class="cx"> if (this._subtype !== "array")
</span><span class="cx"> return 0;
</span><span class="lines">@@ -516,32 +443,116 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> return parseInt(matches[1], 10);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- asCallArgument: function()
</del><ins>+ asCallArgument()
</ins><span class="cx"> {
</span><span class="cx"> return WebInspector.RemoteObject.createCallArgument(this);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> // Private
</span><span class="cx">
</span><del>- _weakCollectionObjectGroup: function()
</del><ins>+ _isSymbol()
</ins><span class="cx"> {
</span><ins>+ return this._type === "symbol";
+ }
+
+ _weakCollectionObjectGroup()
+ {
</ins><span class="cx"> return JSON.stringify(this._objectId) + "-WeakMap";
</span><span class="cx"> }
</span><ins>+
+ _getPropertyDescriptors(ownProperties, callback)
+ {
+ if (!this._objectId || this._isSymbol()) {
+ callback([]);
+ return;
+ }
+
+ RuntimeAgent.getProperties(this._objectId, ownProperties, true, this._getPropertyDescriptorsResolver.bind(this, callback));
+ }
+
+ _getPropertyDescriptorsResolver(callback, error, properties, internalProperties)
+ {
+ if (error) {
+ callback(null);
+ return;
+ }
+
+ var descriptors = properties.map(function(payload) {
+ return WebInspector.PropertyDescriptor.fromPayload(payload);
+ });
+
+ if (internalProperties) {
+ descriptors = descriptors.concat(internalProperties.map(function(payload) {
+ return WebInspector.PropertyDescriptor.fromPayload(payload, true);
+ }));
+ }
+
+ callback(descriptors);
+ }
+
+ // FIXME: Phase out these deprecated functions. They return DeprecatedRemoteObjectProperty instead of PropertyDescriptors.
+ _deprecatedGetProperties(ownProperties, callback)
+ {
+ if (!this._objectId || this._isSymbol()) {
+ callback([]);
+ return;
+ }
+
+ RuntimeAgent.getProperties(this._objectId, ownProperties, this._deprecatedGetPropertiesResolver.bind(this, callback));
+ }
+
+ _deprecatedGetPropertiesResolver(callback, error, properties, internalProperties)
+ {
+ if (error) {
+ callback(null);
+ return;
+ }
+
+ if (internalProperties) {
+ properties = properties.concat(internalProperties.map(function(descriptor) {
+ descriptor.writable = false;
+ descriptor.configurable = false;
+ descriptor.enumerable = false;
+ descriptor.isOwn = true;
+ return descriptor;
+ }));
+ }
+
+ var result = [];
+ for (var i = 0; properties && i < properties.length; ++i) {
+ var property = properties[i];
+ if (property.get || property.set) {
+ if (property.get)
+ result.push(new WebInspector.DeprecatedRemoteObjectProperty("get " + property.name, WebInspector.RemoteObject.fromPayload(property.get), property));
+ if (property.set)
+ result.push(new WebInspector.DeprecatedRemoteObjectProperty("set " + property.name, WebInspector.RemoteObject.fromPayload(property.set), property));
+ } else
+ result.push(new WebInspector.DeprecatedRemoteObjectProperty(property.name, WebInspector.RemoteObject.fromPayload(property.value), property));
+ }
+
+ callback(result);
+ }
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-WebInspector.RemoteObjectProperty = function(name, value, descriptor)
</del><ins>+// FIXME: Phase out this deprecated class.
+WebInspector.DeprecatedRemoteObjectProperty = class DeprecatedRemoteObjectProperty
</ins><span class="cx"> {
</span><del>- this.name = name;
- this.value = value;
- this.enumerable = descriptor ? !!descriptor.enumerable : true;
- this.writable = descriptor ? !!descriptor.writable : true;
- if (descriptor && descriptor.wasThrown)
- this.wasThrown = true;
-};
</del><ins>+ constructor(name, value, descriptor)
+ {
+ this.name = name;
+ this.value = value;
+ this.enumerable = descriptor ? !!descriptor.enumerable : true;
+ this.writable = descriptor ? !!descriptor.writable : true;
+ if (descriptor && descriptor.wasThrown)
+ this.wasThrown = true;
+ }
</ins><span class="cx">
</span><del>-WebInspector.RemoteObjectProperty.fromPrimitiveValue = function(name, value)
-{
- return new WebInspector.RemoteObjectProperty(name, WebInspector.RemoteObject.fromPrimitiveValue(value));
</del><ins>+ // Static
+
+ fromPrimitiveValue(name, value)
+ {
+ return new WebInspector.DeprecatedRemoteObjectProperty(name, WebInspector.RemoteObject.fromPrimitiveValue(value));
+ }
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolReplayObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/ReplayObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/ReplayObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/ReplayObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -24,103 +24,96 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.ReplayPosition = function(segmentOffset, inputOffset)
</del><ins>+// FIXME: This ReplayPosition class shouldn't be here, no matter how simple it is.
+WebInspector.ReplayPosition = class ReplayPosition
</ins><span class="cx"> {
</span><del>- this.segmentOffset = segmentOffset;
- this.inputOffset = inputOffset;
</del><ins>+ constructor(segmentOffset, inputOffset)
+ {
+ this.segmentOffset = segmentOffset;
+ this.inputOffset = inputOffset;
+ }
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-WebInspector.ReplayPosition.fromProtocol = function(payload)
</del><ins>+WebInspector.ReplayObserver = class ReplayObserver
</ins><span class="cx"> {
</span><del>- return new WebInspector.ReplayPosition(payload.segmentOffset, payload.inputOffset);
-};
</del><ins>+ // Events defined by the "Replay" domain.
</ins><span class="cx">
</span><del>-WebInspector.ReplayObserver = function()
-{
- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.ReplayObserver.prototype = {
- constructor: WebInspector.ReplayObserver,
- __proto__: WebInspector.Object.prototype,
-
- captureStarted: function()
</del><ins>+ captureStarted()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.captureStarted();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- captureStopped: function()
</del><ins>+ captureStopped()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.captureStopped();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- playbackStarted: function()
</del><ins>+ playbackStarted()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.playbackStarted();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- playbackHitPosition: function(replayPosition, timestamp)
</del><ins>+ playbackHitPosition(replayPosition, timestamp)
</ins><span class="cx"> {
</span><del>- WebInspector.replayManager.playbackHitPosition(WebInspector.ReplayPosition.fromProtocol(replayPosition), timestamp);
- },
</del><ins>+ WebInspector.replayManager.playbackHitPosition(new WebInspector.ReplayPosition(replayPosition.segmentOffset, replayPosition.inputOffset), timestamp);
+ }
</ins><span class="cx">
</span><del>- playbackPaused: function(replayPosition)
</del><ins>+ playbackPaused(replayPosition)
</ins><span class="cx"> {
</span><del>- WebInspector.replayManager.playbackPaused(WebInspector.ReplayPosition.fromProtocol(replayPosition));
- },
</del><ins>+ WebInspector.replayManager.playbackPaused(new WebInspector.ReplayPosition(replayPosition.segmentOffset, replayPosition.inputOffset));
+ }
</ins><span class="cx">
</span><del>- playbackFinished: function()
</del><ins>+ playbackFinished()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.playbackFinished();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- inputSuppressionChanged: function(willSuppress)
</del><ins>+ inputSuppressionChanged(willSuppress)
</ins><span class="cx"> {
</span><span class="cx"> // Not handled yet.
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- sessionCreated: function(sessionId)
</del><ins>+ sessionCreated(sessionId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.sessionCreated(sessionId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- sessionModified: function(sessionId)
</del><ins>+ sessionModified(sessionId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.sessionModified(sessionId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- sessionRemoved: function(sessionId)
</del><ins>+ sessionRemoved(sessionId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.sessionRemoved(sessionId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- sessionLoaded: function(sessionId)
</del><ins>+ sessionLoaded(sessionId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.sessionLoaded(sessionId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- segmentCreated: function(segmentId)
</del><ins>+ segmentCreated(segmentId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.segmentCreated(segmentId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- segmentRemoved: function(segmentId)
</del><ins>+ segmentRemoved(segmentId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.segmentRemoved(segmentId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- segmentCompleted: function(segmentId)
</del><ins>+ segmentCompleted(segmentId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.segmentCompleted(segmentId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- segmentLoaded: function(segmentId)
</del><ins>+ segmentLoaded(segmentId)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.segmentLoaded(segmentId);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- segmentUnloaded: function()
</del><ins>+ segmentUnloaded()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.replayManager.segmentUnloaded();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolRuntimeObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RuntimeObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RuntimeObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RuntimeObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,21 +23,12 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.RuntimeObserver = function()
</del><ins>+WebInspector.RuntimeObserver = class RuntimeObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.RuntimeObserver.prototype = {
- constructor: WebInspector.RuntimeObserver,
-
</del><span class="cx"> // Events defined by the "Runtime" domain.
</span><span class="cx">
</span><del>- executionContextCreated: function(contextPayload)
</del><ins>+ executionContextCreated(contextPayload)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.frameResourceManager.executionContextCreated(contextPayload);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.RuntimeObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolTimelineObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/TimelineObserver.js (182038 => 182039)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/TimelineObserver.js        2015-03-26 23:35:47 UTC (rev 182038)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/TimelineObserver.js        2015-03-26 23:37:30 UTC (rev 182039)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,31 +23,22 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.TimelineObserver = function()
</del><ins>+WebInspector.TimelineObserver = class TimelineObserver
</ins><span class="cx"> {
</span><del>- // FIXME: Convert this to a WebInspector.Object subclass, and call super().
- // WebInspector.Object.call(this);
-};
-
-WebInspector.TimelineObserver.prototype = {
- constructor: WebInspector.TimelineObserver,
-
</del><span class="cx"> // Events defined by the "Timeline" domain.
</span><span class="cx">
</span><del>- eventRecorded: function(record)
</del><ins>+ eventRecorded(record)
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.timelineManager.eventRecorded(record);
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- recordingStarted: function()
</del><ins>+ recordingStarted()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.timelineManager.capturingStarted();
</span><del>- },
</del><ins>+ }
</ins><span class="cx">
</span><del>- recordingStopped: function()
</del><ins>+ recordingStopped()
</ins><span class="cx"> {
</span><span class="cx"> WebInspector.timelineManager.capturingStopped();
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-
-WebInspector.TimelineObserver.prototype.__proto__ = WebInspector.Object.prototype;
</del></span></pre>
</div>
</div>
</body>
</html>