fix sendable code check.

issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAMZ67

Signed-off-by: zhouwenxuan <zhouwenxuan1@huawei.com>
Change-Id: I5d36affcd9791dd39d08a7a8115388ea5dd5f448
This commit is contained in:
zhouwenxuan 2024-08-28 10:00:37 +08:00
parent 3614686182
commit 46c7bca9bb
2 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ void JSSendableArrayBuffer::CopyDataPointBytes(void *toBuf, void *fromBuf, int32
{
auto *from = static_cast<uint8_t *>(fromBuf);
auto *to = static_cast<uint8_t *>(toBuf);
ASSERT(from != nullptr && to != nullptr);
if (memcpy_s(to, count, from + fromIndex, count) != EOK) { // NOLINT
LOG_FULL(FATAL) << "memcpy_s failed";
UNREACHABLE();

View File

@ -40,7 +40,7 @@ JSTaggedValue JSSharedMapIterator::NextInternal(JSThread *thread, JSHandle<JSTag
JSHandle<JSTaggedValue> undefinedHandle(thread, JSTaggedValue::Undefined());
if (iter->GetIteratedMap().IsUndefined()) {
return JSIterator::CreateIterResultObject(thread, undefinedHandle, true).GetTaggedValue();
};
}
JSHandle<JSSharedMap> iteratedMap(thread, iter->GetIteratedMap());
[[maybe_unused]] ConcurrentApiScope<JSSharedMap> scope(thread, JSHandle<JSTaggedValue>::Cast(iteratedMap));
RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedValue::Exception());