RESOLVED FIXED204532
Web Inspector: Console: the saved result value is still shown after page reload
https://bugs.webkit.org/show_bug.cgi?id=204532
Summary Web Inspector: Console: the saved result value is still shown after page reload
Devin Rousso
Reported 2019-11-22 12:58:47 PST
# STEPS TO REPRODUCE: 1. inspect any page 2. go to the Console Tab 3. enable Preserve Log 4. evaluate `{a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7}` => notice the " == $1" next to it 5. reload the page => the " == $1" stays visible 6. repeat step 4 => two " == $1" are shown
Attachments
Patch (3.97 KB, patch)
2019-11-22 13:00 PST, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-11-22 13:00:27 PST
Blaze Burg
Comment 2 2019-11-22 14:42:23 PST
Comment on attachment 384188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384188&action=review > Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js:248 > + for (let node of this._messageBodyElement.querySelectorAll(".console-saved-variable")) This seems fragile. Can we re-render() the messages in ConsoleMessageView and not draw the saved result index element if the message is older than the epoch (uh, probably since last page reload)?
Devin Rousso
Comment 3 2019-11-22 15:01:42 PST
Comment on attachment 384188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384188&action=review >> Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js:248 >> + for (let node of this._messageBodyElement.querySelectorAll(".console-saved-variable")) > > This seems fragile. Can we re-render() the messages in ConsoleMessageView and not draw the saved result index element if the message is older than the epoch (uh, probably since last page reload)? Fragile in what way? We don't ever save the `.console-saved-variable` element to a member variable, so it's basically "dropped" into the DOM with no expectations about it afterwards. Re-rendering all of the messages would likely have pretty awful performance, especially if there are a lot of messages from previous sessions.
Blaze Burg
Comment 4 2019-12-02 10:38:15 PST
Comment on attachment 384188 [details] Patch r=me I don't think it's worth making this any more complicated at this point.
WebKit Commit Bot
Comment 5 2019-12-02 11:22:29 PST
Comment on attachment 384188 [details] Patch Clearing flags on attachment: 384188 Committed r253000: <https://trac.webkit.org/changeset/253000>
WebKit Commit Bot
Comment 6 2019-12-02 11:22:30 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-12-02 11:23:20 PST
Note You need to log in before you can comment on or make changes to this bug.