Fix master262

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7PDPW

Signed-off-by: 王笑佳 <wangxiaojia5@huawei.com>
This commit is contained in:
王笑佳 2023-07-31 17:38:03 +08:00
parent 138cc3a11d
commit 74bcea4c55
2 changed files with 4 additions and 1 deletions

View File

@ -524,6 +524,7 @@ public:
// 6. Let mnfd be ? Get(options, "minimumFractionDigits").
JSHandle<JSTaggedValue> mnfdKey = globalConst->GetHandledMinimumFractionDigitsString();
JSHandle<JSTaggedValue> mnfd = JSTaggedValue::GetProperty(thread, options, mnfdKey).GetValue();
intlObj->SetMinimumIntegerDigits(thread, JSTaggedValue(mnid));
RETURN_IF_ABRUPT_COMPLETION(thread);
// 7. Let mxfd be ? Get(options, "maximumFractionDigits").
JSHandle<JSTaggedValue> mxfdKey = globalConst->GetHandledMaximumFractionDigitsString();
@ -539,7 +540,6 @@ public:
RETURN_IF_ABRUPT_COMPLETION(thread);
// 10. Set intlObj.[[MinimumIntegerDigits]] to mnid.
intlObj->SetMinimumIntegerDigits(thread, JSTaggedValue(mnid));
// 11. If mnsd is not undefined or mxsd is not undefined, then
if (!mnsd->IsUndefined() || !mxsd->IsUndefined()) {
// a. Set intlObj.[[RoundingType]] to significantDigits.

View File

@ -56,6 +56,9 @@ bool NameDictionary::IsMatch(const uint8_t* str, int size, const JSTaggedValue &
Span<const uint8_t> data1(EcmaStringAccessor(keyString).GetDataUtf8(), keyString->GetLength());
Span<const uint8_t> data2(str, size);
if (data1.Size() != data2.Size()) {
return false;
}
return EcmaString::StringsAreEquals(data1, data2);
}