diff --git a/ecmascript/stubs/runtime_stubs-inl.h b/ecmascript/stubs/runtime_stubs-inl.h index 30b41fa8a3f010f03d7d2a4c20ae94b9243f0e07..ad7eea6d47361a40065f7e827fc1e565691d4777 100644 --- a/ecmascript/stubs/runtime_stubs-inl.h +++ b/ecmascript/stubs/runtime_stubs-inl.h @@ -796,6 +796,10 @@ JSTaggedValue RuntimeStubs::RuntimeStGlobalRecord(JSThread *thread, const JSHand // cross files global record name binding judgment int entry = dict->FindEntry(thread, prop.GetTaggedValue()); if (entry != -1) { + std::string message = "Duplicate identifier \""; + message.append(EcmaStringAccessor(JSTaggedValue::ToString(thread, prop)).ToStdString(thread)); + message.append("\""); + LOG_ECMA(ERROR) << message; return RuntimeThrowSyntaxError(thread, "Duplicate identifier"); }