!8960 fix sendable code check.

Merge pull request !8960 from zhou-wenxuan/sendable_code_check
This commit is contained in:
openharmony_ci 2024-09-03 03:41:02 +00:00 committed by Gitee
commit c4fad9e846
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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());