diff --git a/runtime/base/json_stringifier.cpp b/runtime/base/json_stringifier.cpp index 49cceb45c96ffffeb91acb0774a9278357190f17..b5de02e32971da5bae7c0c66b93502691c66cf95 100644 --- a/runtime/base/json_stringifier.cpp +++ b/runtime/base/json_stringifier.cpp @@ -301,6 +301,8 @@ JSTaggedValue JsonStringifier::GetSerializeValue(const JSHandle & thread_, FastRuntimeStub::FastGetPropertyByValue(thread_, tagValue, toJson.GetTaggedValue())); // b. ReturnIfAbrupt(toJSON). RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_); + // Reread tagValue because GC may move it in FastRuntimeStub::FastGetPropertyByValue + tagValue = value.GetTaggedValue(); // c. If IsCallable(toJSON) is true if (UNLIKELY(toJsonFun->IsCallable())) {