Instead of using `toArray`, we should make use of `Symbol.iterator` and other such things for a cleaner API.
Created attachment 339280 [details] Patch
Comment on attachment 339280 [details] Patch Attachment 339280 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7534207 New failing tests: http/tests/inspector/network/har/har-page.html http/tests/inspector/dom/cross-domain-inspected-node-access.html http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
Created attachment 339282 [details] Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 339280 [details] Patch Attachment 339280 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/7534282 New failing tests: http/tests/inspector/dom/cross-domain-inspected-node-access.html http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
Created attachment 339283 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 339280 [details] Patch Attachment 339280 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/7534614 New failing tests: http/tests/inspector/dom/cross-domain-inspected-node-access.html http/tests/inspector/dom/disconnect-dom-tree-after-main-frame-navigation.html
Created attachment 339288 [details] Archive of layout-test-results from ews114 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 339290 [details] Patch
Comment on attachment 339290 [details] Patch Attachment 339290 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/7535365 New failing tests: http/tests/inspector/network/har/har-page.html
Created attachment 339293 [details] Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 339290 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339290&action=review r=me, nice cleanup > Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:289 > + for (let resource of currentFrame.resourceCollection) Maybe a dumb question, but why isn't the main resource in the resource collection? > LayoutTests/http/tests/inspector/network/har/har-page.html:77 > + for (let resource of WI.frameResourceManager.mainFrame.resourceCollection) You should just push with destructuring, the loop isn't needed here. And somehow this test is failing on EWS?
Comment on attachment 339290 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=339290&action=review >> Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:289 >> + for (let resource of currentFrame.resourceCollection) > > Maybe a dumb question, but why isn't the main resource in the resource collection? I'm not sure actually 😅. I will check to see if the `mainResource` is part of the `resourceCollection.` If I had to guess as to why not (if that's the case), I think it might be that `resourceCollection` holds all the resources associated with the `mainResource` (e.g. CSS and JS files loaded by the main HTML). >> LayoutTests/http/tests/inspector/network/har/har-page.html:77 >> + for (let resource of WI.frameResourceManager.mainFrame.resourceCollection) > > You should just push with destructuring, the loop isn't needed here. And somehow this test is failing on EWS? Ah I missed this one. Not really sure why the test is failing 🤔. The diff suggest that the size of the resulting HAR is different, so maybe my changes affected that?
(In reply to Devin Rousso from comment #12) > Comment on attachment 339290 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=339290&action=review > > >> Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:289 > >> + for (let resource of currentFrame.resourceCollection) > > > > Maybe a dumb question, but why isn't the main resource in the resource collection? > > I'm not sure actually 😅. I will check to see if the `mainResource` is part > of the `resourceCollection.` If I had to guess as to why not (if that's the > case), I think it might be that `resourceCollection` holds all the resources > associated with the `mainResource` (e.g. CSS and JS files loaded by the main > HTML). > > >> LayoutTests/http/tests/inspector/network/har/har-page.html:77 > >> + for (let resource of WI.frameResourceManager.mainFrame.resourceCollection) > > > > You should just push with destructuring, the loop isn't needed here. And somehow this test is failing on EWS? > > Ah I missed this one. Not really sure why the test is failing 🤔. The diff > suggest that the size of the resulting HAR is different, so maybe my changes > affected that? Ah yeah, that is dumb. We should be filtering that out, but feel free to take the easy way out this time.
Created attachment 339575 [details] Patch
Comment on attachment 339575 [details] Patch Clearing flags on attachment: 339575 Committed r231391: <https://trac.webkit.org/changeset/231391>
All reviewed patches have been landed. Closing bug.
<rdar://problem/39994475>