Web Inspector: Remove unnecessary promise rejection handlers now that we use the...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 07:55:42 +0000 (07:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 07:55:42 +0000 (07:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193921

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2019-01-28
Reviewed by Devin Rousso.

* UserInterface/Base/Utilities.js:
* UserInterface/Debug/UncaughtExceptionReporter.js:
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._exportHAR):
* UserInterface/Views/TextEditor.js:
(WI.TextEditor.prototype.updateFormattedState):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240647 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Utilities.js
Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js
Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
Source/WebInspectorUI/UserInterface/Views/TextEditor.js

index 51c1176..1acf60b 100644 (file)
@@ -1,3 +1,17 @@
+2019-01-28  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove unnecessary promise rejection handlers now that we use the global onunhandledrejection handler
+        https://bugs.webkit.org/show_bug.cgi?id=193921
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Base/Utilities.js:
+        * UserInterface/Debug/UncaughtExceptionReporter.js:
+        * UserInterface/Views/NetworkTableContentView.js:
+        (WI.NetworkTableContentView.prototype._exportHAR):
+        * UserInterface/Views/TextEditor.js:
+        (WI.TextEditor.prototype.updateFormattedState):
+
 2019-01-28  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: provide a way to edit page WebRTC settings on a remote target
index c1dded5..524d3f0 100644 (file)
@@ -1769,10 +1769,3 @@ function blobAsText(blob, callback)
     fileReader.addEventListener("loadend", () => { callback(fileReader.result); });
     fileReader.readAsText(blob);
 }
-
-if (!window.handlePromiseException) {
-    window.handlePromiseException = function handlePromiseException(error)
-    {
-        console.error("Uncaught exception in Promise", error);
-    };
-}
index 0283bf5..76352b1 100644 (file)
@@ -299,6 +299,6 @@ Document any additional information that might be useful in resolving the proble
 
 window.addEventListener("error", handleUncaughtException);
 window.addEventListener("unhandledrejection", handleUnhandledPromiseRejection);
-window.handlePromiseException = window.handleInternalException = handleError;
+window.handleInternalException = handleError;
 
 })();
index aa6f45e..f4e76ca 100644 (file)
@@ -1923,7 +1923,7 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie
                 content: JSON.stringify(har, null, 2),
                 forceSaveAs: true,
             });
-        }).catch(handlePromiseException);
+        });
     }
 
     _waterfallPopoverContent()
index 8ee382a..ab96d39 100644 (file)
@@ -200,7 +200,7 @@ WI.TextEditor = class TextEditor extends WI.View
 
     updateFormattedState(formatted)
     {
-        return this._format(formatted).catch(handlePromiseException);
+        return this._format(formatted);
     }
 
     hasFormatter()