WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
35232
Web Inspector: Scripts panel shows blank source when stopping on a breakpoint on refresh.
https://bugs.webkit.org/show_bug.cgi?id=35232
Summary
Web Inspector: Scripts panel shows blank source when stopping on a breakpoint...
Pavel Feldman
Reported
2010-02-22 03:19:06 PST
(Follow up to
https://bugs.webkit.org/show_bug.cgi?id=28799
) I was thinking of a change that prevents scripts from being bound to resources prior to the resource's finished event and it works fine for secondary resources (external scripts). For main resource it would show multiple chunks of script tags first, and, once resource is loaded, it should replace chunks with the resource itself. Besides merging script entries upon resource finished event, there is a problem with chunks having 1-based lines numbering. It all breaks breakpoints.
Attachments
[PATCH] Proposed fix.
(21.12 KB, patch)
2010-02-23 14:17 PST
,
Pavel Feldman
timothy
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2010-02-22 03:21:12 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.
Pavel Feldman
Comment 2
2010-02-23 14:17:37 PST
Created
attachment 49326
[details]
[PATCH] Proposed fix.
Timothy Hatcher
Comment 3
2010-02-23 17:45:26 PST
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.
Pavel Feldman
Comment 4
2010-02-25 05:45:45 PST
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug