File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -883,13 +883,14 @@ namespace jsb
883883 JSB_LOG (Error, " duplicate adding persistent object: %d" , (uintptr_t ) p_pointer);
884884 }
885885
886- void * Environment::get_verified_object (const v8::Local<v8::Object>& p_obj, NativeClassType::Type p_type) const
886+ void * Environment::get_verified_object (const v8::Local<v8::Object>& p_obj, NativeClassType::Type p_type) const
887887 {
888- if (!TypeConvert::is_object (p_obj, p_type))
889- {
890- return nullptr ;
891- }
892- return p_obj->GetAlignedPointerFromInternalField (IF_Pointer);
888+ if (!TypeConvert::is_object (p_obj, p_type))
889+ {
890+ return nullptr ;
891+ }
892+ void * pointer = p_obj->GetAlignedPointerFromInternalField (IF_Pointer);
893+ return verify_object (pointer) ? pointer : nullptr ;
893894 }
894895
895896 bool Environment::reference_object (void * p_pointer, bool p_is_inc)
You can’t perform that action at this time.
0 commit comments