Title: [236891] trunk
Revision
236891
Author
[email protected]
Date
2018-10-05 17:20:54 -0700 (Fri, 05 Oct 2018)

Log Message

Web Inspector: refactor constructor of WI.Resource
https://bugs.webkit.org/show_bug.cgi?id=190318

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Reworked constructor of `WI.Resource` to use an optional object for any non-essential arguments.

Drive-by: moved some simple getters to the top of the class to save space.

* UserInterface/Models/Resource.js:
(WI.Resource):

* UserInterface/Models/SourceMapResource.js:
(WI.SourceMapResource):

* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource):

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.frameDidNavigate):
(WI.NetworkManager.prototype.resourceRequestWillBeSent):
(WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
(WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
(WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
(WI.NetworkManager.prototype._addNewResourceToFrameOrTarget):
(WI.NetworkManager.prototype._createFrame):
(WI.NetworkManager.prototype._createResource):

LayoutTests:

* http/tests/inspector/network/har/har-basic.html:
* inspector/unit-tests/resource-collection.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (236890 => 236891)


--- trunk/LayoutTests/ChangeLog	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/LayoutTests/ChangeLog	2018-10-06 00:20:54 UTC (rev 236891)
@@ -1,3 +1,13 @@
+2018-10-05  Devin Rousso  <[email protected]>
+
+        Web Inspector: refactor constructor of WI.Resource
+        https://bugs.webkit.org/show_bug.cgi?id=190318
+
+        Reviewed by Joseph Pecoraro.
+
+        * http/tests/inspector/network/har/har-basic.html:
+        * inspector/unit-tests/resource-collection.html:
+
 2018-10-05  Joseph Pecoraro  <[email protected]>
 
         Try to unflake inspector/layers/layerTreeDidChange.html

Modified: trunk/LayoutTests/http/tests/inspector/network/har/har-basic.html (236890 => 236891)


--- trunk/LayoutTests/http/tests/inspector/network/har/har-basic.html	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/LayoutTests/http/tests/inspector/network/har/har-basic.html	2018-10-06 00:20:54 UTC (rev 236891)
@@ -34,9 +34,6 @@
             const url = ""
             const mimeType = "text/_javascript_";
             const type = WI.Resource.Type.Script;
-            const loaderIdentifier = undefined;
-            const targetId = undefined;
-            const requestIdentifier = undefined;
             const requestMethod = "GET";
             const requestHeaders = {"Test-Request-Header": "Test Request Header Value"};
             const responseHeaders = {"Test-Response-Header": "Test Response Header Value"};
@@ -43,9 +40,7 @@
             const statusCode = 200;
             const statusText = "OK";
             const source = "network";
-            const requestData = null;
             const requestSentWalltime = 1508723752694 / 1000; // Sun Oct 22 2017 18:55:52 GMT-0700, when this test was written.
-            const initiatorSourceCodeLocation = null;
             const timestamp = undefined;
             const size = 1234;
             const timingData = {
@@ -72,10 +67,10 @@
                 requestHeaders,
             };
 
-            let bareResource = new WI.Resource(url, mimeType, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, timestamp, requestSentWalltime, initiatorSourceCodeLocation, timestamp);
+            let bareResource = new WI.Resource(url, {mimeType, type, requestMethod, requestHeaders, requestSentWalltime});
             bareResource.markAsFinished(undefined);
 
-            let fullResource = new WI.Resource(url, mimeType, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, timestamp, requestSentWalltime, initiatorSourceCodeLocation, timestamp);
+            let fullResource = new WI.Resource(url, {mimeType, type, requestMethod, requestHeaders, requestSentWalltime});
             fullResource.updateForResponse(url, mimeType, type, responseHeaders, statusCode, statusText, timestamp, timingData, source);
             fullResource.increaseSize(size);
             fullResource.updateWithMetrics(metrics);

Modified: trunk/LayoutTests/inspector/unit-tests/resource-collection.html (236890 => 236891)


--- trunk/LayoutTests/inspector/unit-tests/resource-collection.html	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/LayoutTests/inspector/unit-tests/resource-collection.html	2018-10-06 00:20:54 UTC (rev 236891)
@@ -8,7 +8,7 @@
     let suite = InspectorTest.createAsyncSuite("ResourceCollection");
 
     function createResource(url, type) {
-        return new WI.Resource(url, null, type);
+        return new WI.Resource(url, {type});
     }
 
     function logResourceNames(collection) {

Modified: trunk/Source/WebInspectorUI/ChangeLog (236890 => 236891)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-10-06 00:20:54 UTC (rev 236891)
@@ -1,5 +1,35 @@
 2018-10-05  Devin Rousso  <[email protected]>
 
+        Web Inspector: refactor constructor of WI.Resource
+        https://bugs.webkit.org/show_bug.cgi?id=190318
+
+        Reviewed by Joseph Pecoraro.
+
+        Reworked constructor of `WI.Resource` to use an optional object for any non-essential arguments.
+
+        Drive-by: moved some simple getters to the top of the class to save space.
+
+        * UserInterface/Models/Resource.js:
+        (WI.Resource):
+
+        * UserInterface/Models/SourceMapResource.js:
+        (WI.SourceMapResource):
+
+        * UserInterface/Models/WebSocketResource.js:
+        (WI.WebSocketResource):
+
+        * UserInterface/Controllers/NetworkManager.js:
+        (WI.NetworkManager.prototype.frameDidNavigate):
+        (WI.NetworkManager.prototype.resourceRequestWillBeSent):
+        (WI.NetworkManager.prototype.webSocketWillSendHandshakeRequest):
+        (WI.NetworkManager.prototype.resourceRequestWasServedFromMemoryCache):
+        (WI.NetworkManager.prototype.resourceRequestDidReceiveResponse):
+        (WI.NetworkManager.prototype._addNewResourceToFrameOrTarget):
+        (WI.NetworkManager.prototype._createFrame):
+        (WI.NetworkManager.prototype._createResource):
+
+2018-10-05  Devin Rousso  <[email protected]>
+
         Web Inspector: use iframe's name attribute for FrameTreeElement
         https://bugs.webkit.org/show_bug.cgi?id=190275
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js (236890 => 236891)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js	2018-10-06 00:20:54 UTC (rev 236891)
@@ -131,7 +131,14 @@
             // If the frame wasn't known before now, then the main resource was loaded instantly (about:blank, etc.)
             // Make a new resource (which will make the frame). Mark will mark it as loaded at the end too since we
             // don't expect any more events about the load finishing for these frames.
-            var frameResource = this._addNewResourceToFrameOrTarget(null, framePayload.id, framePayload.loaderId, framePayload.url, null, null, null, null, null, null, framePayload.name, framePayload.securityOrigin);
+            let resourceOptions = {
+                loaderIdentifier: framePayload.loaderId,
+            };
+            let frameOptions = {
+                name: framePayload.name,
+                securityOrigin: framePayload.securityOrigin,
+            };
+            let frameResource = this._addNewResourceToFrameOrTarget(framePayload.url, framePayload.id, resourceOptions, frameOptions);
             frame = frameResource.parentFrame;
             frameWasLoadedInstantly = true;
 
@@ -144,12 +151,16 @@
             // There was a provisional load in progress, commit it.
             frame.commitProvisionalLoad(framePayload.securityOrigin);
         } else {
+            let mainResource = null;
             if (frame.mainResource.url !== framePayload.url || frame.loaderIdentifier !== framePayload.loaderId) {
                 // Navigations like back/forward do not have provisional loads, so create a new main resource here.
-                var mainResource = new WI.Resource(framePayload.url, framePayload.mimeType, null, framePayload.loaderId);
+                mainResource = new WI.Resource(framePayload.url, {
+                    mimeType: framePayload.mimeType,
+                    loaderIdentifier: framePayload.loaderId,
+                });
             } else {
                 // The main resource is already correct, so reuse it.
-                var mainResource = frame.mainResource;
+                mainResource = frame.mainResource;
             }
 
             frame.initialize(framePayload.name, framePayload.securityOrigin, framePayload.loaderId, mainResource);
@@ -234,10 +245,20 @@
             return;
         }
 
-        var initiatorSourceCodeLocation = this._initiatorSourceCodeLocationFromPayload(initiator);
-
         // This is a new request, make a new resource and add it to the right frame.
-        resource = this._addNewResourceToFrameOrTarget(requestIdentifier, frameIdentifier, loaderIdentifier, request.url, type, request.method, request.headers, request.postData, elapsedTime, walltime, null, null, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp, targetId);
+        resource = this._addNewResourceToFrameOrTarget(request.url, frameIdentifier, {
+            type,
+            loaderIdentifier,
+            targetId,
+            requestIdentifier,
+            requestMethod: request.method,
+            requestHeaders: request.headers,
+            requestData: request.postData,
+            requestSentTimestamp: elapsedTime,
+            requestSentWalltime: walltime,
+            initiatorSourceCodeLocation: this._initiatorSourceCodeLocationFromPayload(initiator),
+            originalRequestWillBeSentTimestamp,
+        });
 
         // Associate the resource with the requestIdentifier so it can be found in future loading events.
         this._resourceRequestIdentifierMap.set(requestIdentifier, resource);
@@ -262,17 +283,17 @@
         }
 
         // FIXME: <webkit.org/b/168475> Web Inspector: Correctly display iframe's and worker's WebSockets
-        let frameIdentifier = WI.networkManager.mainFrame.id;
-        let loaderIdentifier = WI.networkManager.mainFrame.id;
-        let targetId;
 
-        let frame = this.frameForIdentifier(frameIdentifier);
-        let requestData = null;
-        let elapsedTime = WI.timelineManager.computeElapsedTime(timestamp);
-        let initiatorSourceCodeLocation = null;
+        let resource = new WI.WebSocketResource(url, {
+            loaderIdentifier: WI.networkManager.mainFrame.id,
+            requestIdentifier: requestId,
+            requestHeaders: request.headers,
+            timestamp,
+            walltime,
+            requestSentTimestamp: WI.timelineManager.computeElapsedTime(timestamp),
+        });
 
-        let resource = new WI.WebSocketResource(url, loaderIdentifier, targetId, requestId, request.headers, requestData, timestamp, walltime, elapsedTime, initiatorSourceCodeLocation);
-
+        let frame = this.frameForIdentifier(WI.networkManager.mainFrame.id);
         frame.addResource(resource);
 
         this._resourceRequestIdentifierMap.set(requestId, resource);
@@ -369,11 +390,17 @@
         console.assert(!this._resourceRequestIdentifierMap.has(requestIdentifier));
 
         let elapsedTime = WI.timelineManager.computeElapsedTime(timestamp);
-        let initiatorSourceCodeLocation = this._initiatorSourceCodeLocationFromPayload(initiator);
         let response = cachedResourcePayload.response;
         const responseSource = NetworkAgent.ResponseSource.MemoryCache;
 
-        let resource = this._addNewResourceToFrameOrTarget(requestIdentifier, frameIdentifier, loaderIdentifier, cachedResourcePayload.url, cachedResourcePayload.type, "GET", null, null, elapsedTime, null, null, null, initiatorSourceCodeLocation);
+        let resource = this._addNewResourceToFrameOrTarget(cachedResourcePayload.url, frameIdentifier, {
+            type: cachedResourcePayload.type,
+            loaderIdentifier,
+            requestIdentifier,
+            requestMethod: "GET",
+            requestSentTimestamp: elapsedTime,
+            initiatorSourceCodeLocation: this._initiatorSourceCodeLocationFromPayload(initiator),
+        });
         resource.updateForResponse(cachedResourcePayload.url, response.mimeType, cachedResourcePayload.type, response.headers, response.status, response.statusText, elapsedTime, response.timing, responseSource);
         resource.increaseSize(cachedResourcePayload.bodySize, elapsedTime);
         resource.increaseTransferSize(cachedResourcePayload.bodySize);
@@ -420,7 +447,13 @@
         // If we haven't found an existing Resource by now, then it is a resource that was loading when the inspector
         // opened and we just missed the resourceRequestWillBeSent for it. So make a new resource and add it.
         if (!resource) {
-            resource = this._addNewResourceToFrameOrTarget(requestIdentifier, frameIdentifier, loaderIdentifier, response.url, type, null, response.requestHeaders, null, elapsedTime, null, null, null, null);
+            resource = this._addNewResourceToFrameOrTarget(response.url, frameIdentifier, {
+                type,
+                loaderIdentifier,
+                requestIdentifier,
+                requestHeaders: response.requestHeaders,
+                requestSentTimestamp: elapsedTime,
+            });
 
             // Associate the resource with the requestIdentifier so it can be found in future loading events.
             this._resourceRequestIdentifierMap.set(requestIdentifier, resource);
@@ -544,17 +577,17 @@
 
     // Private
 
-    _addNewResourceToFrameOrTarget(requestIdentifier, frameIdentifier, loaderIdentifier, url, type, requestMethod, requestHeaders, requestData, elapsedTime, walltime, frameName, frameSecurityOrigin, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp, targetId)
+    _addNewResourceToFrameOrTarget(url, frameIdentifier, resourceOptions = {}, frameOptions = {})
     {
         console.assert(!this._waitingForMainFrameResourceTreePayload);
 
         let resource = null;
 
-        if (!frameIdentifier && targetId) {
+        if (!frameIdentifier && resourceOptions.targetId) {
             // This is a new resource for a ServiceWorker target.
             console.assert(WI.sharedApp.debuggableType === WI.DebuggableType.ServiceWorker);
-            console.assert(targetId === WI.mainTarget.identifier);
-            resource = new WI.Resource(url, null, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, elapsedTime, walltime, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp);
+            console.assert(resourceOptions.targetId === WI.mainTarget.identifier);
+            resource = new WI.Resource(url, resourceOptions);
             resource.target.addResource(resource);
             return resource;
         }
@@ -562,25 +595,25 @@
         let frame = this.frameForIdentifier(frameIdentifier);
         if (frame) {
             // This is a new request for an existing frame, which might be the main resource or a new resource.
-            if (type === "Document" && frame.mainResource.url ="" url && frame.loaderIdentifier === loaderIdentifier)
+            if (resourceOptions.type === "Document" && frame.mainResource.url ="" url && frame.loaderIdentifier === resourceOptions.loaderIdentifier)
                 resource = frame.mainResource;
-            else if (type === "Document" && frame.provisionalMainResource && frame.provisionalMainResource.url ="" url && frame.provisionalLoaderIdentifier === loaderIdentifier)
+            else if (resourceOptions.type === "Document" && frame.provisionalMainResource && frame.provisionalMainResource.url ="" url && frame.provisionalLoaderIdentifier === resourceOptions.loaderIdentifier)
                 resource = frame.provisionalMainResource;
             else {
-                resource = new WI.Resource(url, null, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, elapsedTime, walltime, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp);
+                resource = new WI.Resource(url, resourceOptions);
                 if (resource.target === WI.pageTarget)
                     this._addResourceToFrame(frame, resource);
                 else if (resource.target)
                     resource.target.addResource(resource);
                 else
-                    this._addOrphanedResource(resource, targetId);
+                    this._addOrphanedResource(resource, resourceOptions.targetId);
             }
         } else {
             // This is a new request for a new frame, which is always the main resource.
             console.assert(WI.sharedApp.debuggableType !== WI.DebuggableType.ServiceWorker);
-            console.assert(!targetId);
-            resource = new WI.Resource(url, null, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, elapsedTime, walltime, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp);
-            frame = new WI.Frame(frameIdentifier, frameName, frameSecurityOrigin, loaderIdentifier, resource);
+            console.assert(!resourceOptions.targetId);
+            resource = new WI.Resource(url, resourceOptions);
+            frame = new WI.Frame(frameIdentifier, frameOptions.name, frameOptions.securityOrigin, resourceOptions.loaderIdentifier, resource);
             this._frameIdentifierMap.set(frame.id, frame);
 
             // If we don't have a main frame, assume this is it. This can change later in
@@ -729,7 +762,10 @@
     {
         // If payload.url is missing or empty then this page is likely the special empty page. In that case
         // we will just say it is "about:blank" so we have a URL, which is required for resources.
-        var mainResource = new WI.Resource(payload.url || "about:blank", payload.mimeType, null, payload.loaderId);
+        let mainResource = new WI.Resource(payload.url || "about:blank", {
+            mimeType: payload.mimeType,
+            loaderIdentifier: payload.loaderId,
+        });
         var frame = new WI.Frame(payload.id, payload.name, payload.securityOrigin, payload.loaderId, mainResource);
 
         this._frameIdentifierMap.set(frame.id, frame);
@@ -741,7 +777,12 @@
 
     _createResource(payload, framePayload)
     {
-        var resource = new WI.Resource(payload.url, payload.mimeType, payload.type, framePayload.loaderId, payload.targetId);
+        let resource = new WI.Resource(payload.url, {
+            mimeType: payload.mimeType,
+            type: payload.type,
+            loaderIdentifier: framePayload.loaderId,
+            targetId: payload.targetId,
+        });
 
         if (payload.sourceMapURL)
             this.downloadSourceMap(payload.sourceMapURL, resource.url, resource);

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js (236890 => 236891)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js	2018-10-06 00:20:54 UTC (rev 236891)
@@ -26,7 +26,7 @@
 
 WI.Resource = class Resource extends WI.SourceCode
 {
-    constructor(url, mimeType, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, requestSentTimestamp, requestSentWalltime, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp)
+    constructor(url, {mimeType, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, requestSentTimestamp, requestSentWalltime, initiatorSourceCodeLocation, originalRequestWillBeSentTimestamp} = {})
     {
         super();
 
@@ -280,6 +280,8 @@
 
     // Public
 
+    get url() { return this._url; }
+    get mimeType() { return this._mimeType; }
     get target() { return this._target; }
     get type() { return this._type; }
     get loaderIdentifier() { return this._loaderIdentifier; }
@@ -286,6 +288,9 @@
     get requestIdentifier() { return this._requestIdentifier; }
     get requestMethod() { return this._requestMethod; }
     get requestData() { return this._requestData; }
+    get initiatorSourceCodeLocation() { return this._initiatorSourceCodeLocation; }
+    get initiatedResources() { return this._initiatedResources; }
+    get originalRequestWillBeSentTimestamp() { return this._originalRequestWillBeSentTimestamp; }
     get statusCode() { return this._statusCode; }
     get statusText() { return this._statusText; }
     get responseSource() { return this._responseSource; }
@@ -294,12 +299,26 @@
     get priority() { return this._priority; }
     get remoteAddress() { return this._remoteAddress; }
     get connectionIdentifier() { return this._connectionIdentifier; }
+    get parentFrame() { return this._parentFrame; }
+    get finished() { return this._finished; }
+    get failed() { return this._failed; }
+    get canceled() { return this._canceled; }
+    get failureReasonText() { return this._failureReasonText; }
+    get requestHeaders() { return this._requestHeaders; }
+    get responseHeaders() { return this._responseHeaders; }
+    get requestSentTimestamp() { return this._requestSentTimestamp; }
+    get requestSentWalltime() { return this._requestSentWalltime; }
+    get lastRedirectReceivedTimestamp() { return this._lastRedirectReceivedTimestamp; }
+    get responseReceivedTimestamp() { return this._responseReceivedTimestamp; }
+    get lastDataReceivedTimestamp() { return this._lastDataReceivedTimestamp; }
+    get finishedOrFailedTimestamp() { return this._finishedOrFailedTimestamp; }
+    get cached() { return this._cached; }
+    get requestHeadersTransferSize() { return this._requestHeadersTransferSize; }
+    get requestBodyTransferSize() { return this._requestBodyTransferSize; }
+    get responseHeadersTransferSize() { return this._responseHeadersTransferSize; }
+    get responseBodyTransferSize() { return this._responseBodyTransferSize; }
+    get cachedResponseBodySize() { return this._cachedResponseBodySize; }
 
-    get url()
-    {
-        return this._url;
-    }
-
     get urlComponents()
     {
         if (!this._urlComponents)
@@ -319,26 +338,6 @@
         return WI.truncateURL(this._url, isMultiLine, dataURIMaxSize);
     }
 
-    get initiatorSourceCodeLocation()
-    {
-        return this._initiatorSourceCodeLocation;
-    }
-
-    get initiatedResources()
-    {
-        return this._initiatedResources;
-    }
-
-    get originalRequestWillBeSentTimestamp()
-    {
-        return this._originalRequestWillBeSentTimestamp;
-    }
-
-    get mimeType()
-    {
-        return this._mimeType;
-    }
-
     get mimeTypeComponents()
     {
         if (!this._mimeTypeComponents)
@@ -403,31 +402,6 @@
         this.dispatchEventToListeners(WI.Resource.Event.InitiatedResourcesDidChange);
     }
 
-    get parentFrame()
-    {
-        return this._parentFrame;
-    }
-
-    get finished()
-    {
-        return this._finished;
-    }
-
-    get failed()
-    {
-        return this._failed;
-    }
-
-    get canceled()
-    {
-        return this._canceled;
-    }
-
-    get failureReasonText()
-    {
-        return this._failureReasonText;
-    }
-
     get queryStringParameters()
     {
         if (this._queryStringParameters === undefined)
@@ -447,16 +421,6 @@
         return this._requestHeaders.valueForCaseInsensitiveKey("Content-Type") || null;
     }
 
-    get requestHeaders()
-    {
-        return this._requestHeaders;
-    }
-
-    get responseHeaders()
-    {
-        return this._responseHeaders;
-    }
-
     get requestCookies()
     {
         if (!this._requestCookies)
@@ -487,41 +451,11 @@
         return this._responseCookies;
     }
 
-    get requestSentTimestamp()
-    {
-        return this._requestSentTimestamp;
-    }
-
-    get requestSentWalltime()
-    {
-        return this._requestSentWalltime;
-    }
-
     get requestSentDate()
     {
         return isNaN(this._requestSentWalltime) ? null : new Date(this._requestSentWalltime * 1000);
     }
 
-    get lastRedirectReceivedTimestamp()
-    {
-        return this._lastRedirectReceivedTimestamp;
-    }
-
-    get responseReceivedTimestamp()
-    {
-        return this._responseReceivedTimestamp;
-    }
-
-    get lastDataReceivedTimestamp()
-    {
-        return this._lastDataReceivedTimestamp;
-    }
-
-    get finishedOrFailedTimestamp()
-    {
-        return this._finishedOrFailedTimestamp;
-    }
-
     get firstTimestamp()
     {
         return this.timingData.startTime || this.lastRedirectReceivedTimestamp || this.responseReceivedTimestamp || this.lastDataReceivedTimestamp || this.finishedOrFailedTimestamp;
@@ -547,17 +481,6 @@
         return this.timingData.responseEnd - this.timingData.startTime;
     }
 
-    get cached()
-    {
-        return this._cached;
-    }
-
-    get requestHeadersTransferSize() { return this._requestHeadersTransferSize; }
-    get requestBodyTransferSize() { return this._requestBodyTransferSize; }
-    get responseHeadersTransferSize() { return this._responseHeadersTransferSize; }
-    get responseBodyTransferSize() { return this._responseBodyTransferSize; }
-    get cachedResponseBodySize() { return this._cachedResponseBodySize; }
-
     get size()
     {
         if (!isNaN(this._cachedResponseBodySize))

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js (236890 => 236891)


--- trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js	2018-10-06 00:20:54 UTC (rev 236891)
@@ -27,7 +27,7 @@
 {
     constructor(url, sourceMap)
     {
-        super(url, null);
+        super(url);
 
         console.assert(url);
         console.assert(sourceMap);
@@ -51,10 +51,7 @@
 
     // Public
 
-    get sourceMap()
-    {
-        return this._sourceMap;
-    }
+    get sourceMap() { return this._sourceMap; }
 
     get sourceMapDisplaySubpath()
     {

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js (236890 => 236891)


--- trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js	2018-10-06 00:02:48 UTC (rev 236890)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js	2018-10-06 00:20:54 UTC (rev 236891)
@@ -25,12 +25,16 @@
 
 WI.WebSocketResource = class WebSocketResource extends WI.Resource
 {
-    constructor(url, loaderIdentifier, targetId, requestIdentifier, requestHeaders, requestData, timestamp, walltime, requestSentTimestamp, initiatorSourceCodeLocation)
+    constructor(url, {loaderIdentifier, requestIdentifier, requestHeaders, timestamp, walltime, requestSentTimestamp} = {})
     {
-        const type = WI.Resource.Type.WebSocket;
-        const mimeType = null;
-        const requestMethod = "GET";
-        super(url, mimeType, type, loaderIdentifier, targetId, requestIdentifier, requestMethod, requestHeaders, requestData, requestSentTimestamp, initiatorSourceCodeLocation);
+        super(url, {
+            type: WI.Resource.Type.WebSocket,
+            loaderIdentifier,
+            requestIdentifier,
+            requestMethod: "GET",
+            requestHeaders,
+            requestSentTimestamp,
+        });
 
         this._timestamp = timestamp;
         this._walltime = walltime;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to