Title: [240499] trunk/Source/WebInspectorUI
- Revision
- 240499
- Author
- [email protected]
- Date
- 2019-01-25 13:35:03 -0800 (Fri, 25 Jan 2019)
Log Message
Web Inspector: show uncaught exception view for unhandled promise rejections
https://bugs.webkit.org/show_bug.cgi?id=193832
Reviewed by Matt Baker.
* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleUnhandledPromiseRejection): Added.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (240498 => 240499)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-01-25 20:52:11 UTC (rev 240498)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-01-25 21:35:03 UTC (rev 240499)
@@ -1,5 +1,15 @@
2019-01-25 Devin Rousso <[email protected]>
+ Web Inspector: show uncaught exception view for unhandled promise rejections
+ https://bugs.webkit.org/show_bug.cgi?id=193832
+
+ Reviewed by Matt Baker.
+
+ * UserInterface/Debug/UncaughtExceptionReporter.js:
+ (handleUnhandledPromiseRejection): Added.
+
+2019-01-25 Devin Rousso <[email protected]>
+
Web Inspector: REGRESSION (r237808): offscreen path warning doesn't work
https://bugs.webkit.org/show_bug.cgi?id=193830
Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js (240498 => 240499)
--- trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js 2019-01-25 20:52:11 UTC (rev 240498)
+++ trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js 2019-01-25 21:35:03 UTC (rev 240499)
@@ -82,6 +82,16 @@
});
}
+function handleUnhandledPromiseRejection(event) {
+ handleUncaughtExceptionRecord({
+ message: event.reason.message,
+ url: urlLastPathComponent(event.reason.sourceURL),
+ lineNumber: event.reason.line,
+ columnNumber: event.reason.column,
+ stack: event.reason.stack,
+ });
+}
+
function handleUncaughtExceptionRecord(exceptionRecord) {
try {
if (!WI.settings.enableUncaughtExceptionReporter.value)
@@ -288,6 +298,7 @@
}
window.addEventListener("error", handleUncaughtException);
+window.addEventListener("unhandledrejection", handleUnhandledPromiseRejection);
window.handlePromiseException = window.handleInternalException = handleError;
})();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes