Web Inspector: InspectorFrontendAPIDispatcher should not ignore all exceptions
[WebKit-https.git] / Source / WebCore / ChangeLog
index df5bd0f..a62ce9d 100644 (file)
@@ -1,3 +1,30 @@
+2020-12-04  Brian Burg  <bburg@apple.com>
+
+        Web Inspector: InspectorFrontendAPIDispatcher should not ignore all exceptions
+        https://bugs.webkit.org/show_bug.cgi?id=219378
+
+        Reviewed by Devin Rousso.
+
+        Covered by existing Web Inspector layout tests.
+
+        * bindings/js/ScriptController.h: Make evaluateInWorld public and exported.
+
+        * inspector/InspectorFrontendAPIDispatcher.h:
+        * inspector/InspectorFrontendAPIDispatcher.cpp:
+        (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression):
+        (WebCore::InspectorFrontendAPIDispatcher::evaluateExpression):
+        Evaluate and pass along the result whether it's a value or exception.
+
+        * inspector/InspectorFrontendClientLocal.h:
+        * inspector/InspectorFrontendClientLocal.cpp:
+        (WebCore::InspectorFrontendClientLocal::evaluationResultToBoolean):
+        (WebCore::InspectorFrontendClientLocal::isDebuggingEnabled):
+        (WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled):
+        (WebCore::InspectorFrontendClientLocal::isProfilingJavaScript):
+        Refactor the common code to take an EvaluationResult and figure out if the value is true or falsy.
+
+        * platform/Logging.h: Add an Inspector logging channel, for logging errors.
+
 2020-12-04  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][Floats] FloatAvoider does not need to keep a pointer to Layout::Box around.