!6496 修复高德录制因碰到不确定指针失败的问题

Merge pull request !6496 from qibao/master
This commit is contained in:
openharmony_ci 2024-03-18 07:49:37 +00:00 committed by Gitee
commit c04d25cdcd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -4744,7 +4744,9 @@ void JSObject::DumpForSnapshot(std::vector<Reference> &vec) const
{
DISALLOW_GARBAGE_COLLECTION;
JSHClass *jshclass = GetJSHClass();
vec.emplace_back(CString("__proto__"), jshclass->GetPrototype());
if (jshclass != nullptr) {
vec.emplace_back(CString("__proto__"), jshclass->GetPrototype());
}
TaggedArray *elements = TaggedArray::Cast(GetElements().GetTaggedObject());
@ -4764,7 +4766,7 @@ void JSObject::DumpForSnapshot(std::vector<Reference> &vec) const
return;
}
vec.emplace_back("(object properties)", JSTaggedValue(properties));
if (!properties->IsDictionaryMode()) {
if ((!properties->IsDictionaryMode()) && (jshclass != nullptr)) {
JSTaggedValue attrs = jshclass->GetLayout();
if (attrs.IsNull()) {
return;

View File

@ -30,6 +30,7 @@ public:
{
return static_cast<TaggedObject *>(header);
}
TaggedObject(): class_(0) {}
void SynchronizedSetClass(const JSThread *thread, JSHClass *hclass);
JSHClass *SynchronizedGetClass() const;