DevTools: queryObjects(Array) should not grow forever |
||
Issue descriptionWhat steps will reproduce the problem? (1) Repeatedly evaluate 'queryObjects(Array)' in the DevTools console (2) Observe the size of the array (3) Clear the console (4) Observe the size of the array What is the expected result? The size should reset after clearing the console. Users may also benefit from another 'info/note' icon next to the queryObjects result saying that "A new Array has been allocated for this result" to avoid surprise. What happens instead? The result of queryObjects is an Array itself, which has a reference that doesn't get cleared upon console.clear.
,
Mar 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d452a7f63a41cff3e48f0d6b83238fd798fc28da commit d452a7f63a41cff3e48f0d6b83238fd798fc28da Author: Erik Luo <luoe@chromium.org> Date: Wed Mar 14 20:12:56 2018 [inspector] queryObjects() should take objectGroup Now, 'queryObjects' takes an optional 'objectGroup' argument, allowing the frontend to release the response value. This is important because each call produces a new Array, which could not be released before. Bug: chromium:815263 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: I18c9a68c4ba45020fce9eea63cb263396a18d498 Reviewed-on: https://chromium-review.googlesource.com/935153 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#51938} [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/src/inspector/js_protocol.json [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/src/inspector/js_protocol.pdl [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/src/inspector/v8-runtime-agent-impl.cc [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/src/inspector/v8-runtime-agent-impl.h [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/test/inspector/protocol-test.js [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/test/inspector/runtime/query-objects-expected.txt [modify] https://crrev.com/d452a7f63a41cff3e48f0d6b83238fd798fc28da/test/inspector/runtime/query-objects.js
,
Mar 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3e55967faae330715ffceaf984e8cac636334a72 commit 3e55967faae330715ffceaf984e8cac636334a72 Author: Erik Luo <luoe@chromium.org> Date: Wed Mar 14 22:03:08 2018 DevTools: show specific note for queryObjects result This modifies the 'i' note next to the queryObjects result array to describe how objects may not be collected if they are previewed until console.clear Screenshot: https://imgur.com/a/q03rG Bug: 815263 Change-Id: I872ca733fd4b3ae3f64487e6c969167c26119c62 Reviewed-on: https://chromium-review.googlesource.com/961556 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#543215} [modify] https://crrev.com/3e55967faae330715ffceaf984e8cac636334a72/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js [modify] https://crrev.com/3e55967faae330715ffceaf984e8cac636334a72/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js [modify] https://crrev.com/3e55967faae330715ffceaf984e8cac636334a72/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
,
Mar 14 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by l...@chromium.org
, Feb 28 2018