Bug 225124 - Move ExceptionExpectation into its own .h file.
Summary: Move ExceptionExpectation into its own .h file.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-27 14:43 PDT by Mark Lam
Modified: 2021-04-27 15:54 PDT (History)
11 users (show)

See Also:


Attachments
proposed patch. (7.21 KB, patch)
2021-04-27 14:46 PDT, Mark Lam
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
proposed patch. (7.20 KB, patch)
2021-04-27 15:05 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (7.63 KB, patch)
2021-04-27 15:18 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (8.41 KB, patch)
2021-04-27 15:24 PDT, Mark Lam
rmorisset: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2021-04-27 14:43:39 PDT
Patch coming.
Comment 1 Mark Lam 2021-04-27 14:46:23 PDT
Created attachment 427198 [details]
proposed patch.
Comment 2 Mark Lam 2021-04-27 15:05:29 PDT
Created attachment 427200 [details]
proposed patch.
Comment 3 Mark Lam 2021-04-27 15:18:14 PDT
Created attachment 427201 [details]
proposed patch.
Comment 4 Mark Lam 2021-04-27 15:24:15 PDT
Created attachment 427202 [details]
proposed patch.
Comment 5 Robin Morisset 2021-04-27 15:41:35 PDT
Comment on attachment 427202 [details]
proposed patch.

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

> Source/JavaScriptCore/ChangeLog:3
> +        Move ExceptionExpectation into its own .h file.

What is the goal of this?

> Source/JavaScriptCore/runtime/ExceptionHelpers.h:-39
> -enum class ExceptionExpectation {

Should we not #include "ExceptionExpectation" if it is used in this file?
Comment 6 Mark Lam 2021-04-27 15:43:19 PDT
Comment on attachment 427202 [details]
proposed patch.

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

>> Source/JavaScriptCore/ChangeLog:3
>> +        Move ExceptionExpectation into its own .h file.
> 
> What is the goal of this?

It belongs in its own file instead of some other header file.  I was previously lazy and just stashed it in ExceptionHelpers.h.  Just making it right now.

>> Source/JavaScriptCore/runtime/ExceptionHelpers.h:-39
>> -enum class ExceptionExpectation {
> 
> Should we not #include "ExceptionExpectation" if it is used in this file?

It's not used in this file.
Comment 7 Robin Morisset 2021-04-27 15:44:19 PDT
Comment on attachment 427202 [details]
proposed patch.

r=me
Comment 8 Mark Lam 2021-04-27 15:50:13 PDT
Oops, my uploaded patch was missing this bit:

@@ -463,9 +463,10 @@ bool JSGenericTypedArrayView<Adaptor>::g
         return false;
 
     JSValue value;
-    if constexpr (Adaptor::canConvertToJSQuickly)
+    if constexpr (Adaptor::canConvertToJSQuickly) {
+        UNUSED_VARIABLE(scope);
         value = thisObject->getIndexQuickly(propertyName);
-    else {
+    } else {
         auto nativeValue = thisObject->getIndexQuicklyAsNativeValue(propertyName);
         value = Adaptor::toJSValue(globalObject, nativeValue);
         RETURN_IF_EXCEPTION(scope, false);

Talked to Robin offline, and he ok'ed me to include it for landing.
Comment 9 Mark Lam 2021-04-27 15:53:36 PDT
Thanks for the review.  Landed in r276676: <http://trac.webkit.org/r276676>.
Comment 10 Radar WebKit Bug Importer 2021-04-27 15:54:19 PDT
<rdar://problem/77235155>