mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-26 19:50:55 +00:00
!10274 fix the problem of napi_get_property interface which could access dead object
Merge pull request !10274 from shilei91/master
This commit is contained in:
commit
5f199ac319
@ -821,10 +821,11 @@ JSTaggedValue ObjectFastOperator::FastGetPropertyByValue(JSThread *thread, JSTag
|
||||
SCheckMode sCheckMode)
|
||||
{
|
||||
INTERPRETER_TRACE(thread, FastGetPropertyByValue);
|
||||
JSHandle<JSTaggedValue> receiverHandler(thread, receiver);
|
||||
JSHandle<JSTaggedValue> keyHandler(thread, key);
|
||||
JSTaggedValue result = ObjectFastOperator::GetPropertyByValue(thread, receiver, key);
|
||||
if (result.IsHole()) {
|
||||
return JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>(thread, receiver),
|
||||
JSHandle<JSTaggedValue>(thread, key), sCheckMode).GetValue().GetTaggedValue();
|
||||
return JSTaggedValue::GetProperty(thread, receiverHandler, keyHandler, sCheckMode).GetValue().GetTaggedValue();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user