From f7db873bd5e05abaef4d786ae28bed38572b44f1 Mon Sep 17 00:00:00 2001 From: Nazarov Konstantin Date: Thu, 9 Mar 2023 12:03:59 +0300 Subject: [PATCH] fix errors in es2panda Signed-off-by: Nazarov Konstantin --- runtime/builtins.cpp | 2 +- runtime/napi/jsnapi.cpp | 2 +- tests/runtime/builtins/builtins_function_test.cpp | 2 +- tests/runtime/builtins/builtins_promise_test.cpp | 6 +++--- tests/runtime/builtins/builtins_reflect_test.cpp | 2 +- tests/runtime/common/js_object_test.cpp | 4 ++-- tests/runtime/common/js_proxy_test.cpp | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/runtime/builtins.cpp b/runtime/builtins.cpp index 38b53b174..474dfffd6 100644 --- a/runtime/builtins.cpp +++ b/runtime/builtins.cpp @@ -3218,7 +3218,7 @@ void Builtins::InitializeFuzzilli(const JSHandle &env, const JSHandle ASSERT(argv); BUILTINS_API_TRACE(argv->GetThread(), Object, Constructor); JSThread *thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); auto value = GetCallArg(argv, 0); JSHandle command = JSTaggedValue::ToString(thread, value); diff --git a/runtime/napi/jsnapi.cpp b/runtime/napi/jsnapi.cpp index fc01813ef..faef8f85f 100644 --- a/runtime/napi/jsnapi.cpp +++ b/runtime/napi/jsnapi.cpp @@ -1448,7 +1448,7 @@ JSTaggedValue Callback::RegisterCallback(ecmascript::EcmaRuntimeCallInfo *info) { // Constructor JSThread *thread = info->GetThread(); - [[maybe_unused]] panda::ecmascript::EcmaHandleScope handleScope(thread); + [[maybe_unused]] panda::ecmascript::EcmaHandleScope handle_scope(thread); JSHandle constructor = BuiltinsBase::GetConstructor(info); if (!constructor->IsJSFunction()) { return JSTaggedValue::False(); diff --git a/tests/runtime/builtins/builtins_function_test.cpp b/tests/runtime/builtins/builtins_function_test.cpp index 07aac87ed..7dc4d1d38 100644 --- a/tests/runtime/builtins/builtins_function_test.cpp +++ b/tests/runtime/builtins/builtins_function_test.cpp @@ -65,7 +65,7 @@ public: JSTaggedValue TestFunctionApplyAndCall(EcmaRuntimeCallInfo *argv) { JSThread *thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); int result = 0; diff --git a/tests/runtime/builtins/builtins_promise_test.cpp b/tests/runtime/builtins/builtins_promise_test.cpp index cd0bf8b8a..ee273882c 100644 --- a/tests/runtime/builtins/builtins_promise_test.cpp +++ b/tests/runtime/builtins/builtins_promise_test.cpp @@ -74,7 +74,7 @@ JSTaggedValue TestPromiseRaceThenOnRejectd(EcmaRuntimeCallInfo *argv) // native function for all then_on_resolved() JSTaggedValue TestPromiseAllThenOnResolved(EcmaRuntimeCallInfo *argv) { - [[maybe_unused]] EcmaHandleScope handleScope(argv->GetThread()); + [[maybe_unused]] EcmaHandleScope handle_scope(argv->GetThread()); JSHandle array = BuiltinsBase::GetCallArg(argv, 0); JSHandle object_array = JSHandle::Cast(array); [[maybe_unused]] PropertyDescriptor desc(argv->GetThread()); @@ -105,7 +105,7 @@ JSTaggedValue TestPromiseCatch(EcmaRuntimeCallInfo *argv) // native function for then then_on_resolved() JSTaggedValue TestPromiseThenOnResolved(EcmaRuntimeCallInfo *argv) { - [[maybe_unused]] EcmaHandleScope handleScope(argv->GetThread()); + [[maybe_unused]] EcmaHandleScope handle_scope(argv->GetThread()); auto factory = argv->GetThread()->GetEcmaVM()->GetFactory(); JSHandle result = BuiltinsBase::GetCallArg(argv, 0); auto expect = factory->NewFromCanBeCompressString("resolve"); @@ -116,7 +116,7 @@ JSTaggedValue TestPromiseThenOnResolved(EcmaRuntimeCallInfo *argv) // native function for then then_on_rejected() JSTaggedValue TestPromiseThenOnRejected(EcmaRuntimeCallInfo *argv) { - [[maybe_unused]] EcmaHandleScope handleScope(argv->GetThread()); + [[maybe_unused]] EcmaHandleScope handle_scope(argv->GetThread()); auto factory = argv->GetThread()->GetEcmaVM()->GetFactory(); JSHandle result = BuiltinsBase::GetCallArg(argv, 0); auto expect = factory->NewFromCanBeCompressString("reject"); diff --git a/tests/runtime/builtins/builtins_reflect_test.cpp b/tests/runtime/builtins/builtins_reflect_test.cpp index 529bff9a9..0da059ef0 100644 --- a/tests/runtime/builtins/builtins_reflect_test.cpp +++ b/tests/runtime/builtins/builtins_reflect_test.cpp @@ -71,7 +71,7 @@ static JSHandle TestObjectCreate(JSThread *thread) JSTaggedValue TestReflectApply(EcmaRuntimeCallInfo *argv) { auto thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); int result = 0; diff --git a/tests/runtime/common/js_object_test.cpp b/tests/runtime/common/js_object_test.cpp index 62baabefc..af9a8624e 100644 --- a/tests/runtime/common/js_object_test.cpp +++ b/tests/runtime/common/js_object_test.cpp @@ -606,7 +606,7 @@ TEST_F(JSObjectTest, TestIntegrityLevelWithoutProperty) JSTaggedValue TestGetter(EcmaRuntimeCallInfo *argv) { auto thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); JSHandle obj(BuiltinsBase::GetThis(argv)); JSHandle key(factory->NewFromString("y")); @@ -643,7 +643,7 @@ TEST_F(JSObjectTest, Getter) JSTaggedValue TestSetter(EcmaRuntimeCallInfo *argv) { JSThread *thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); JSHandle obj(BuiltinsBase::GetThis(argv)); JSHandle key(factory->NewFromString("y")); diff --git a/tests/runtime/common/js_proxy_test.cpp b/tests/runtime/common/js_proxy_test.cpp index ff80a62e3..6192410eb 100644 --- a/tests/runtime/common/js_proxy_test.cpp +++ b/tests/runtime/common/js_proxy_test.cpp @@ -487,7 +487,7 @@ TEST_F(JSProxyTest, HasProperty) JSTaggedValue HandlerOwnPropertyKeys([[maybe_unused]] EcmaRuntimeCallInfo *argv) { auto thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); JSHandle arr = factory->NewJSArray(); return JSTaggedValue(arr.GetTaggedValue()); @@ -586,7 +586,7 @@ TEST_F(JSProxyTest, Call) JSTaggedValue HandlerConstruct([[maybe_unused]] EcmaRuntimeCallInfo *argv) { auto thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); JSHandle dynclass(thread, JSObjectTestCreate(thread)); JSHandle obj(factory->NewJSObjectByConstructor(JSHandle(dynclass), dynclass)); @@ -599,7 +599,7 @@ JSTaggedValue HandlerConstruct([[maybe_unused]] EcmaRuntimeCallInfo *argv) JSTaggedValue HandlerConFunc([[maybe_unused]] EcmaRuntimeCallInfo *argv) { auto thread = argv->GetThread(); - [[maybe_unused]] EcmaHandleScope handleScope(thread); + [[maybe_unused]] EcmaHandleScope handle_scope(thread); ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); JSHandle dynclass(thread, JSObjectTestCreate(thread)); JSHandle obj(factory->NewJSObjectByConstructor(JSHandle(dynclass), dynclass)); -- Gitee