Changeset 247175 in webkit


Ignore:
Timestamp:
Jul 5, 2019 2:30:31 PM (5 years ago)
Author:
ysuzuki@apple.com
Message:

Unreviewed, fix build failure on ARM64_32
https://bugs.webkit.org/show_bug.cgi?id=182434

Implicit narrowing from uint64_t to uint32_t happens. We should explicitly narrow it because we already checked
the length is <= UINT32_MAX.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncSpeciesCreate):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r247173 r247175  
     12019-07-05  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Unreviewed, fix build failure on ARM64_32
     4        https://bugs.webkit.org/show_bug.cgi?id=182434
     5
     6        Implicit narrowing from uint64_t to uint32_t happens. We should explicitly narrow it because we already checked
     7        the `length` is <= UINT32_MAX.
     8
     9        * runtime/ArrayPrototype.cpp:
     10        (JSC::arrayProtoFuncSpeciesCreate):
     11
    1122019-07-05  Alexey Shvayka  <shvaikalesh@gmail.com>
    213
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r247173 r247175  
    285285    }
    286286
    287     RELEASE_AND_RETURN(scope, JSValue::encode(constructEmptyArray(exec, nullptr, length)));
     287    RELEASE_AND_RETURN(scope, JSValue::encode(constructEmptyArray(exec, nullptr, static_cast<unsigned>(length))));
    288288}
    289289
Note: See TracChangeset for help on using the changeset viewer.