WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190318
Web Inspector: refactor constructor of WI.Resource
https://bugs.webkit.org/show_bug.cgi?id=190318
Summary
Web Inspector: refactor constructor of WI.Resource
Devin Rousso
Reported
2018-10-05 11:24:16 PDT
It's a pretty huge mess right now, especially if we need to add more parameters.
Attachments
Patch
(27.38 KB, patch)
2018-10-05 11:30 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-sierra-wk2
(3.07 MB, application/zip)
2018-10-05 12:22 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews100 for mac-sierra
(2.45 MB, application/zip)
2018-10-05 12:38 PDT
,
EWS Watchlist
no flags
Details
Patch
(27.36 KB, patch)
2018-10-05 13:24 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(27.46 KB, patch)
2018-10-05 14:59 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2018-10-05 11:30:21 PDT
Created
attachment 351685
[details]
Patch
EWS Watchlist
Comment 2
2018-10-05 12:22:29 PDT
Comment hidden (obsolete)
Comment on
attachment 351685
[details]
Patch
Attachment 351685
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/9464850
New failing tests: http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html
EWS Watchlist
Comment 3
2018-10-05 12:22:31 PDT
Comment hidden (obsolete)
Created
attachment 351688
[details]
Archive of layout-test-results from ews105 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 4
2018-10-05 12:38:19 PDT
Comment hidden (obsolete)
Comment on
attachment 351685
[details]
Patch
Attachment 351685
[details]
did not pass mac-ews (mac): Output:
https://webkit-queues.webkit.org/results/9465003
New failing tests: http/tests/websocket/tests/hybi/inspector/resolveWebSocket.html
EWS Watchlist
Comment 5
2018-10-05 12:38:21 PDT
Comment hidden (obsolete)
Created
attachment 351692
[details]
Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
Devin Rousso
Comment 6
2018-10-05 13:24:23 PDT
Created
attachment 351694
[details]
Patch
Joseph Pecoraro
Comment 7
2018-10-05 14:13:50 PDT
Comment on
attachment 351694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=351694&action=review
r=me if all tests are green.
> Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:139 > + let frameResource = this._addNewResourceToFrameOrTarget(framePayload.url, framePayload.id, { > + loaderIdentifier: framePayload.loaderId, > + }, { > + name: framePayload.name, > + securityOrigin: framePayload.securityOrigin, > + });
Can we style this like: let resourceOptions = { ... }; let frameOptions = { ... }; let frameResource = this._addNewResourceToFrameOrTarget(...);
> Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js:-28 > - constructor(url, loaderIdentifier, targetId, requestIdentifier, requestHeaders, requestData, timestamp, walltime, requestSentTimestamp, initiatorSourceCodeLocation)
It seems concerning that this takes a subset of Resource initialization options and so might need to be manually added back if used later.
Devin Rousso
Comment 8
2018-10-05 14:51:58 PDT
Comment on
attachment 351694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=351694&action=review
>> Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js:-28 >> - constructor(url, loaderIdentifier, targetId, requestIdentifier, requestHeaders, requestData, timestamp, walltime, requestSentTimestamp, initiatorSourceCodeLocation) > > It seems concerning that this takes a subset of Resource initialization options and so might need to be manually added back if used later.
One of the nice things about using an object-bag is that it makes it MUCH easier/cleaner to re-add these if needed. Updating both the constructor and any call-sites is much simpler to keep track of. :)
Devin Rousso
Comment 9
2018-10-05 14:59:00 PDT
Created
attachment 351700
[details]
Patch
WebKit Commit Bot
Comment 10
2018-10-05 17:21:01 PDT
Comment on
attachment 351700
[details]
Patch Clearing flags on attachment: 351700 Committed
r236891
: <
https://trac.webkit.org/changeset/236891
>
WebKit Commit Bot
Comment 11
2018-10-05 17:21:02 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2018-10-05 17:22:32 PDT
<
rdar://problem/45060404
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug