Web Inspector: Uncaught exception in CSS with string "constructor" (WebInspector...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2016 00:12:35 +0000 (00:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2016 00:12:35 +0000 (00:12 +0000)
commit04100c3fbf7f0a47ffa35efc345ea7234c5d45e5
tree0b399c5cb5a1043a3158e55bb831cb41f29a6438
parentbeb029fb3e2cc37f191d93cd5fe9e76e3ec38e8d
Web Inspector: Uncaught exception in CSS with string "constructor" (WebInspector.Color.fromString())
https://bugs.webkit.org/show_bug.cgi?id=156183
<rdar://problem/25539279>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-04
Reviewed by Brian Burg.

* UserInterface/Models/Color.js:
(WebInspector.Color.fromString):
Fix the uncaught exception issue. Only look at own properties of
our keyword map to avoid values like "toString" and "constructor".

* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleError):
(handleUncaughtException):
(handleUncaughtExceptionRecord):
Generalize uncaught exception handler error sheet to get
exception records from both uncaught exceptions (window.onerror)
and general Runtime Error objects (TypeError, etc).

* UserInterface/Base/Utilities.js:
(window.promiseLogError.window.promiseLogError):
Add a fallback log exception helper.

* UserInterface/Controllers/AnalyzerManager.js:
(WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
Add catch handlers to Promises to log exceptions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Utilities.js
Source/WebInspectorUI/UserInterface/Controllers/AnalyzerManager.js
Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js
Source/WebInspectorUI/UserInterface/Models/Color.js
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js