Changeset 276676 in webkit


Ignore:
Timestamp:
Apr 27, 2021 3:52:55 PM (3 years ago)
Author:
mark.lam@apple.com
Message:

Move ExceptionExpectation into its own .h file.
https://bugs.webkit.org/show_bug.cgi?id=225124

Reviewed by Robin Morisset.

Also fixed some compiler warnings.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/ExceptionExpectation.h: Added.
  • runtime/ExceptionHelpers.h:
  • runtime/HashMapImplInlines.h:

(JSC::jsMapHashImpl):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType):
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):

Location:
trunk/Source/JavaScriptCore
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r276069 r276676  
    897897    runtime/Exception.h
    898898    runtime/ExceptionEventLocation.h
     899    runtime/ExceptionExpectation.h
    899900    runtime/ExceptionHelpers.h
    900901    runtime/ExceptionScope.h
  • trunk/Source/JavaScriptCore/ChangeLog

    r276660 r276676  
     12021-04-27  Mark Lam  <mark.lam@apple.com>
     2
     3        Move ExceptionExpectation into its own .h file.
     4        https://bugs.webkit.org/show_bug.cgi?id=225124
     5
     6        Reviewed by Robin Morisset.
     7
     8        Also fixed some compiler warnings.
     9
     10        * CMakeLists.txt:
     11        * JavaScriptCore.xcodeproj/project.pbxproj:
     12        * runtime/ExceptionExpectation.h: Added.
     13        * runtime/ExceptionHelpers.h:
     14        * runtime/HashMapImplInlines.h:
     15        (JSC::jsMapHashImpl):
     16        * runtime/JSGenericTypedArrayViewInlines.h:
     17        (JSC::JSGenericTypedArrayView<Adaptor>::setWithSpecificType):
     18        (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):
     19
    1202021-04-27  Alexey Shvayka  <shvaikalesh@gmail.com>
    221
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r276069 r276676  
    20172017                FEF5B4292628B5240016E776 /* JSSetInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF5B4282628B5240016E776 /* JSSetInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
    20182018                FEF5B42C2628CBC80016E776 /* VMTrapsInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF5B42B2628CBC80016E776 /* VMTrapsInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     2019                FEF5B430262A338B0016E776 /* ExceptionExpectation.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF5B42F262A338B0016E776 /* ExceptionExpectation.h */; settings = {ATTRIBUTES = (Private, ); }; };
    20192020                FEFD6FC61D5E7992008F2F0B /* JSStringInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = FEFD6FC51D5E7970008F2F0B /* JSStringInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
    20202021/* End PBXBuildFile section */
     
    54285429                FEF5B4282628B5240016E776 /* JSSetInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSetInlines.h; sourceTree = "<group>"; };
    54295430                FEF5B42B2628CBC80016E776 /* VMTrapsInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMTrapsInlines.h; sourceTree = "<group>"; };
     5431                FEF5B42F262A338B0016E776 /* ExceptionExpectation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionExpectation.h; sourceTree = "<group>"; };
    54305432                FEFD6FC51D5E7970008F2F0B /* JSStringInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringInlines.h; sourceTree = "<group>"; };
    54315433/* End PBXFileReference section */
     
    73467348                                FE80C19A1D7768FD008510C0 /* ExceptionEventLocation.cpp */,
    73477349                                FE6029D81D6E1E330030204D /* ExceptionEventLocation.h */,
     7350                                FEF5B42F262A338B0016E776 /* ExceptionExpectation.h */,
    73487351                                0F12DE0D1979D5FD0006FF4E /* ExceptionFuzz.cpp */,
    73497352                                0F12DE0E1979D5FD0006FF4E /* ExceptionFuzz.h */,
     
    1074510748                                ADE8029C1E08F1DE0058DE78 /* WebAssemblyLinkErrorPrototype.h in Headers */,
    1074610749                                AD2FCBF51DB58DAD00B3E736 /* WebAssemblyMemoryConstructor.h in Headers */,
     10750                                FEF5B430262A338B0016E776 /* ExceptionExpectation.h in Headers */,
    1074710751                                AD2FCC1A1DB59CB200B3E736 /* WebAssemblyMemoryConstructor.lut.h in Headers */,
    1074810752                                AD2FCBF71DB58DAD00B3E736 /* WebAssemblyMemoryPrototype.h in Headers */,
  • trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.h

    r276106 r276676  
    3636
    3737namespace JSC {
    38 
    39 enum class ExceptionExpectation {
    40     CanThrow,
    41     ShouldNotThrow
    42 };
    4338
    4439typedef JSObject* (*ErrorFactory)(JSGlobalObject*, const String&, ErrorInstance::SourceAppender);
  • trunk/Source/JavaScriptCore/runtime/HashMapImplInlines.h

    r276217 r276676  
    2626#pragma once
    2727
     28#include "ExceptionExpectation.h"
    2829#include "HashMapImpl.h"
    2930#include "JSCJSValueInlines.h"
     
    9798            RETURN_IF_EXCEPTION(scope, UINT_MAX);
    9899        else
    99             EXCEPTION_ASSERT(!scope.exception());
     100            EXCEPTION_ASSERT_UNUSED(scope, !scope.exception());
    100101        return wtfString.impl()->hash();
    101102    }
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h

    r273750 r276676  
    176176    RELEASE_ASSERT(other->canAccessRangeQuickly(otherOffset, length));
    177177    bool success = validateRange(globalObject, offset, length);
    178     EXCEPTION_ASSERT(!scope.exception() == success);
     178    EXCEPTION_ASSERT_UNUSED(scope, !scope.exception() == success);
    179179    if (!success)
    180180        return false;
     
    464464
    465465    JSValue value;
    466     if constexpr (Adaptor::canConvertToJSQuickly)
     466    if constexpr (Adaptor::canConvertToJSQuickly) {
     467        UNUSED_VARIABLE(scope);
    467468        value = thisObject->getIndexQuickly(propertyName);
    468     else {
     469    } else {
    469470        auto nativeValue = thisObject->getIndexQuicklyAsNativeValue(propertyName);
    470471        value = Adaptor::toJSValue(globalObject, nativeValue);
Note: See TracChangeset for help on using the changeset viewer.