Bug 68827 - Web Inspector: Scripts panel without folders causes errors when creating content scripts section.
Summary: Web Inspector: Scripts panel without folders causes errors when creating cont...
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: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 12:43 PDT by Vsevolod Vlasov
Modified: 2011-09-29 04:38 PDT (History)
11 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2011-09-26 12:55 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (18.13 KB, patch)
2011-09-27 09:15 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2011-09-26 12:43:06 PDT
Scripts panel without folders causes errors when creating content scripts section.

"Uncaught TypeError: Cannot call method 'localeCompare' of undefined", source: chrome-devtools://devtools/ScriptsPanel.js (312)

optionCompare() at ScriptsPanel.js:312
binarySearch() at BinarySearch.js:39
insertionIndexForObjectInListSortedByFunction() at BinarySearch.js:60
insertOrdered() at ScriptsPanel.js:314
WebInspector.ScriptsPanel._addOptionToFilesSelect() at ScriptsPanel.js:326
WebInspector.ScriptsPanel._showScriptFoldersSettingChanged() at ScriptsPanel.js:265
bound() at utilities.js:40
WebInspector.Object.dispatchEventToListeners() at Object.js:93
WebInspector.Setting.set() at Settings.js:157
listener() at SettingsScreen.js:101
Comment 1 Vsevolod Vlasov 2011-09-26 12:55:02 PDT
Created attachment 108712 [details]
Patch
Comment 2 Vsevolod Vlasov 2011-09-26 12:56:00 PDT
Content scripts should be tested LayoutTests/inspector/debugger/scripts-sorting.html
Comment 3 Pavel Feldman 2011-09-26 14:36:31 PDT
Comment on attachment 108712 [details]
Patch

We should support content script section in both modes.
Comment 4 Vsevolod Vlasov 2011-09-26 15:09:32 PDT
Should we? They are already highlighted in blue.
Showing a separate section makes typing in file selector useless for content scripts.

Anyway, currently they are not shown at all.
Comment 5 Pavel Feldman 2011-09-27 09:15:39 PDT
Created attachment 108857 [details]
Patch
Comment 6 Vsevolod Vlasov 2011-09-27 09:56:15 PDT
Comment on attachment 108857 [details]
Patch

Looks good.
Comment 7 Yury Semikhatsky 2011-09-28 08:18:29 PDT
Comment on attachment 108857 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=108857&action=review

> LayoutTests/inspector/debugger/scripts-sorting.html:30
> +        addOption("*Non*URL*path");

Move this string into the array.

> LayoutTests/inspector/debugger/scripts-sorting.html:37
> +        addOption("*Non*URL*path", true);

Ditto.
Comment 8 Pavel Feldman 2011-09-29 04:38:20 PDT
Committed r96319: <http://trac.webkit.org/changeset/96319>