Bug 113136 - Web Inspector: Exception when turning on pretty print without any displayed source in the editor
Summary: Web Inspector: Exception when turning on pretty print without any displayed s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-23 08:57 PDT by PhistucK
Modified: 2013-03-25 01:57 PDT (History)
9 users (show)

See Also:


Attachments
Added an existence check. (1.68 KB, patch)
2013-03-23 09:08 PDT, PhistucK
no flags Details | Formatted Diff | Diff
Fixed the change log. (1.70 KB, patch)
2013-03-23 09:12 PDT, PhistucK
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description PhistucK 2013-03-23 08:57:59 PDT
Clicking on the pretty print button throws a TypeError when no source is displayed within the Sources editor.
This happens because we try to get the URL of the currently edited source when notifying the user metrics about turning on pretty print, without checking whether there actually is one.
Comment 1 PhistucK 2013-03-23 09:08:31 PDT
Created attachment 194704 [details]
Added an existence check.
Comment 2 WebKit Review Bot 2013-03-23 09:11:45 PDT
Attachment 194704 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/inspector/front-end/ScriptsPanel.js']" exit_code: 1
Source/WebCore/ChangeLog:11:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 PhistucK 2013-03-23 09:12:53 PDT
Created attachment 194706 [details]
Fixed the change log.
Comment 4 WebKit Review Bot 2013-03-25 01:57:53 PDT
Comment on attachment 194706 [details]
Fixed the change log.

Clearing flags on attachment: 194706

Committed r146749: <http://trac.webkit.org/changeset/146749>
Comment 5 WebKit Review Bot 2013-03-25 01:57:57 PDT
All reviewed patches have been landed.  Closing bug.