If a ResourceCollection is created without a type, and a Resource object is added to it, a sub-collection (also a ResourceCollection) is created for that specific type and stored in a Map. If the type on that Resource changes, the `WebInspector.Resource.Event.TypeDidChange` event listeners for both the "parent" collection and the sub-collection will be fired, and both attempt to remove the resource from the sub-collection of that type: - The "parent" tries to add it to the sub-collection of the new type (creating one if it does not exist) and remove it from the sub-collection of the old type - The sub-collection of the old type tries to remove it from itself since it has a specified type, and changing types means that it no longer matches
<rdar://problem/29040483>
Created attachment 293536 [details] Patch
Comment on attachment 293536 [details] Patch Attachment 293536 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2425667 New failing tests: inspector/unit-tests/resource-collection.html
Created attachment 293538 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 293536 [details] Patch Attachment 293536 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2425671 New failing tests: inspector/unit-tests/resource-collection.html
Created attachment 293540 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 293536 [details] Patch Attachment 293536 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2425692 New failing tests: inspector/unit-tests/resource-collection.html
Created attachment 293541 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 293536 [details] Patch r- because of resource-collection.html failure. Maybe test expectations need updating?
Created attachment 293557 [details] Patch
Comment on attachment 293557 [details] Patch r=me
Comment on attachment 293557 [details] Patch Clearing flags on attachment: 293557 Committed r208234: <http://trac.webkit.org/changeset/208234>
All reviewed patches have been landed. Closing bug.