diff --git a/android/intltest/build.gradle b/android/intltest/build.gradle index 45bc9fa14..8d9da90b5 100644 --- a/android/intltest/build.gradle +++ b/android/intltest/build.gradle @@ -34,6 +34,7 @@ task prepareTests() { include("test/intl402/String/**/*.js") include("test/intl402/Number/**/*.js") include("test/intl402/Array/**/*.js") + include("test/intl402/TypedArray/**/*.js") include("test/intl402/Date/**/*.js") include("test/intl402/Intl/**/*.js") include("test/built-ins/String/prototype/toLocale**/*.js") diff --git a/android/intltest/java/com/facebook/hermes/test/HermesIntlTest262.java b/android/intltest/java/com/facebook/hermes/test/HermesIntlTest262.java index 640637864..a83c34f16 100644 --- a/android/intltest/java/com/facebook/hermes/test/HermesIntlTest262.java +++ b/android/intltest/java/com/facebook/hermes/test/HermesIntlTest262.java @@ -53,6 +53,7 @@ public class HermesIntlTest262 extends InstrumentationTestCase { evalScriptFromAsset(rt, "test262/harness/compareArray.js"); evalScriptFromAsset(rt, "test262/harness/dateConstants.js"); evalScriptFromAsset(rt, "test262/harness/isConstructor.js"); + evalScriptFromAsset(rt, "test262/harness/testTypedArray.js"); } public void test262Intl() throws IOException { diff --git a/lib/VM/JSLib/TypedArray.cpp b/lib/VM/JSLib/TypedArray.cpp index 08755729a..8c60f7929 100644 --- a/lib/VM/JSLib/TypedArray.cpp +++ b/lib/VM/JSLib/TypedArray.cpp @@ -1632,7 +1632,12 @@ typedArrayPrototypeToLocaleString(void *, Runtime &runtime, NativeArgs args) { } if (auto func = Handle::dyn_vmcast( runtime.makeHandle(std::move(*propRes)))) { +#ifdef HERMES_ENABLE_INTL + auto callRes = Callable::executeCall2( + func, runtime, elementObj, args.getArg(0), args.getArg(1)); +#else auto callRes = Callable::executeCall0(func, runtime, elementObj); +#endif if (LLVM_UNLIKELY(callRes == ExecutionStatus::EXCEPTION)) { return ExecutionStatus::EXCEPTION; }