Bug 142603

Summary: Web Inspector: Console Errors during provisional document loads get lost with "Clear Log on Reload"
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Joseph Pecoraro
Reported 2015-03-11 17:44:46 PDT
* SUMMARY Console Errors during provisional document loads get lost with "Clear Log on Reload". * STEPS TO REPRODUCE 1. Enable "Clear Log on Reload" in Web Inspector's console (context menu in Console Log View) 2. Inspect <https://docs.google.com/spreadsheets/d/1ch7X6RljdfAFjfGY926UkLrPxZTrcbIYg0bGmrJ8gHQ/edit?usp=sharing_eid> [you do not need access to the file] 3. Reload => error message shows in console then gets cleared * NOTES Order of events: -> Page.reload -> Page.frameWillStartLoading -> Network.requestWillBeSent -> Network.responseReceived (error) -> Console.messageAdded -> commit -> Console.messagesCleared -> Page.frameNavigated So we receive the error during provisional loading, and auto-clear it. We should preserve these messages that relate more to the new page, not the old page. <rdar://problem/20044957>
Attachments
[PATCH] Proposed Fix (4.34 KB, patch)
2015-03-11 17:50 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2015-03-11 17:50:00 PDT
Created attachment 248470 [details] [PATCH] Proposed Fix I tried an approach using a marker ConsoleSession in the JavaScriptLogViewController. It quickly got more complex then this, and being yet-another-Session had styling issues that I couldn't figure out. This approach is far simpler and gives expected behavior with very few drawbacks given the rare cases it would occur.
Timothy Hatcher
Comment 2 2015-03-12 08:25:46 PDT
Comment on attachment 248470 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=248470&action=review > Source/WebInspectorUI/ChangeLog:11 > + Detect a provisional load has started to start save messages that come in at this time. Whoa. Nice fix. > Source/WebInspectorUI/UserInterface/Views/LogContentView.js:33 > + // FIXME: Try to use a marker, instead of a list of messages that get re-added. Yeah, that would be good. Maybe the console rework can fix this.
WebKit Commit Bot
Comment 3 2015-03-12 09:10:31 PDT
Comment on attachment 248470 [details] [PATCH] Proposed Fix Clearing flags on attachment: 248470 Committed r181437: <http://trac.webkit.org/changeset/181437>
WebKit Commit Bot
Comment 4 2015-03-12 09:10:36 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.