Bug 144662

Summary: Web Inspector: SourceCodeTextEditor shows "undefined" instead of resource content when pausing during resource load
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, 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-05-05 21:12:02 PDT
* SUMMARY SourceCodeTextEditor shows "undefined" instead of resource content when pausing during resource load * STEPS TO REPRODUCE 1. Inspect <http://bogojoker.com/shell/> 2. Set a breakpoint on easySlider.min.js:2 3. Reload the page => Script content loads, then goes undefined
Attachments
[PATCH] Proposed Fix (4.79 KB, patch)
2015-05-05 21:33 PDT, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2015-05-05 21:12:16 PDT
Joseph Pecoraro
Comment 2 2015-05-05 21:14:43 PDT
There are a few issues at play here. This is the "pause during load" scenario. The frontend doesn't yet have the Resource, but it has the Script. 1. The Frontend successfully loads the Script contents. But the Resource content load overwrites the editor with a fail message. 2. ResourceContentView.js does: > resource.requestContent().then(this._contentAvailable.bind(this)).catch(this._contentError.bind(this)); - The promise can succeed with an error in which case it calls _contentError with an object. - The promise can fail with an error in which case it calls _contentError with a string. This inconsistency results in the "undefined" message instead of the expected "No data found for resource with given identifier" message here.
Joseph Pecoraro
Comment 3 2015-05-05 21:33:59 PDT
Created attachment 252445 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 4 2015-05-06 00:08:16 PDT
Comment on attachment 252445 [details] [PATCH] Proposed Fix Clearing flags on attachment: 252445 Committed r183863: <http://trac.webkit.org/changeset/183863>
WebKit Commit Bot
Comment 5 2015-05-06 00:08:20 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.