Bug 225124

Summary: Move ExceptionExpectation into its own .h file.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, ews-watchlist, gyuyoung.kim, keith_miller, msaboff, rmorisset, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
ews-feeder: commit-queue-
proposed patch.
none
proposed patch.
none
proposed patch. rmorisset: review+

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>