Summary: | Web Inspector: Scripts panel shows blank source when stopping on a breakpoint on refresh. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pavel Feldman <pfeldman> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Pavel Feldman <pfeldman> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, bweinstein, joepeck, rik, timothy | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
URL: | http://testsuites.opera.com/JSON/correctness/004.html | ||||||
Attachments: |
|
Description
Pavel Feldman
2010-02-22 03:19:06 PST
Steps to repro: 1. go to http://testsuites.opera.com/JSON/correctness/004.html 2. enable the debugger 3. set a breakpoint somewhere in the code of 004.js 4. reload the page Result: 004.js is sometimes shown with empty content. Created attachment 49326 [details]
[PATCH] Proposed fix.
Comment on attachment 49326 [details] [PATCH] Proposed fix. > + var prefix = []; > + for (var i = 0; i < this.script.startingLine; ++i) > + prefix.push(""); > + > + this.sourceFrame.setContent("text/javascript", prefix.join("\n") + this.script.source); Why not just build a string by appending "\n"? I think JSC optimizes that case. > + this._resourceForURLInFilesSelect[script.resource.url] = script.resource; > + } > + > + var displayName = script.sourceURL ? WebInspector.displayNameForURL(script.sourceURL) : WebInspector.UIString("(program)"); Bad indent on the } line. Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/Panel.js M WebCore/inspector/front-end/ResourcesPanel.js M WebCore/inspector/front-end/Script.js M WebCore/inspector/front-end/ScriptView.js M WebCore/inspector/front-end/ScriptsPanel.js M WebCore/inspector/front-end/SourceView.js M WebCore/inspector/front-end/inspector.js Committed r55231 |