* 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
<rdar://problem/20831216>
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.
Created attachment 252445 [details] [PATCH] Proposed Fix
Comment on attachment 252445 [details] [PATCH] Proposed Fix Clearing flags on attachment: 252445 Committed r183863: <http://trac.webkit.org/changeset/183863>
All reviewed patches have been landed. Closing bug.