Bug 156183 - Web Inspector: Uncaught exception in CSS with string "constructor" (WebInspector.Color.fromString())
Summary: Web Inspector: Uncaught exception in CSS with string "constructor" (WebInspec...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
Keywords: InRadar
Depends on:
Reported: 2016-04-04 15:24 PDT by Joseph Pecoraro
Modified: 2016-04-04 17:12 PDT (History)
8 users (show)

See Also:

[PATCH] Proposed Fix (6.03 KB, patch)
2016-04-04 15:41 PDT, Joseph Pecoraro
bburg: review+
bburg: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Landing (6.27 KB, patch)
2016-04-04 16:13 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-04-04 15:24:30 PDT
Uncaught exception in CSS with string "constructor" (WebInspector.Color.fromString())

constructor { constructor: constructor; }

[Error] Uncaught exception in promise
TypeError: WebInspector.Color.Keywords[keyword].concat is not a function. (In 'WebInspector.Color.Keywords[keyword].concat(1)', 'WebInspector.Color.Keywords[keyword].concat' is undefined)

fromString — Color.js:112:131
createCodeMirrorTextMarkers — CodeMirrorTextMarkers.js:65
createCodeMirrorColorTextMarkers — CodeMirrorTextMarkers.js:121
_updateEditableMarkers — SourceCodeTextEditor.js:1582
_contentDidPopulate — SourceCodeTextEditor.js:431
_populateWithContent — SourceCodeTextEditor.js:449
_contentAvailable — SourceCodeTextEditor.js:472
	promiseLogError (Utilities.js:1250)
Comment 1 Radar WebKit Bug Importer 2016-04-04 15:24:51 PDT
Comment 2 Joseph Pecoraro 2016-04-04 15:41:10 PDT
Created attachment 275583 [details]
[PATCH] Proposed Fix
Comment 3 BJ Burg 2016-04-04 16:04:47 PDT
Comment on attachment 275583 [details]
[PATCH] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js:213
> +window.promiseLogError = handleError;

heh heh, very clever.

> Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js:81
> +        sourceCode.requestContent().then(this._contentAvailable.bind(this)).catch(promiseLogError);

Reading this function in context, I don't like the function name. It sounds like the verb is 'promise' to log something, not 'log' a promise error. Maybe it should be called handlePromiseException or something.

> Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js:83
>          // FIXME: Cmd+L shorcut doesn't actually work.

Drive-by Nit: 'shortcut'
Comment 4 Joseph Pecoraro 2016-04-04 16:13:35 PDT
Created attachment 275587 [details]
[PATCH] For Landing
Comment 5 WebKit Commit Bot 2016-04-04 17:12:30 PDT
Comment on attachment 275587 [details]
[PATCH] For Landing

Clearing flags on attachment: 275587

Committed r199031: <http://trac.webkit.org/changeset/199031>
Comment 6 WebKit Commit Bot 2016-04-04 17:12:34 PDT
All reviewed patches have been landed.  Closing bug.