@@ -57,7 +57,7 @@ Local<Object> MetadataNode::CreateExtendedJSWrapper(Isolate *isolate, ObjectMana
5757 extInstance = objectManager->GetEmptyObject (isolate);
5858 extInstance->SetInternalField (static_cast <int >(ObjectManager::MetadataNodeKeys::CallSuper), True (isolate));
5959 auto extdCtorFunc = Local<Function>::New (isolate, *cacheData.extendedCtorFunction );
60- extInstance->SetPrototype (extdCtorFunc->Get (ArgConverter::ConvertToV8String (isolate, " prototype " )));
60+ extInstance->SetPrototype (extdCtorFunc->Get (V8StringConstants::GetPrototype (isolate)));
6161
6262 SetInstanceMetadata (isolate, extInstance, cacheData.node );
6363 }
@@ -183,7 +183,7 @@ Local<Object> MetadataNode::CreateJSWrapper(Isolate *isolate, ObjectManager *obj
183183 {
184184 auto ctorFunc = GetConstructorFunction (isolate);
185185 obj->Set (ArgConverter::ConvertToV8String (isolate, " constructor" ), ctorFunc);
186- obj->SetPrototype (ctorFunc->Get (ArgConverter::ConvertToV8String (isolate, " prototype " )));
186+ obj->SetPrototype (ctorFunc->Get (V8StringConstants::GetPrototype (isolate)));
187187 SetInstanceMetadata (isolate, obj, this );
188188 }
189189 }
@@ -226,7 +226,7 @@ Local<Object> MetadataNode::CreateArrayWrapper(Isolate *isolate)
226226 arrayObjectTemplate->SetIndexedPropertyHandler (ArrayIndexedPropertyGetterCallback, ArrayIndexedPropertySetterCallback);
227227
228228 auto arr = arrayObjectTemplate->NewInstance ();
229- arr->SetPrototype (objPrototype->Get (ArgConverter::ConvertToV8String (isolate, " prototype " )));
229+ arr->SetPrototype (objPrototype->Get (V8StringConstants::GetPrototype (isolate)));
230230 arr->SetAccessor (ArgConverter::ConvertToV8String (isolate, " length" ), ArrayLengthGetterCallack, nullptr , Local<Value>(), AccessControl::ALL_CAN_READ, PropertyAttribute::DontDelete);
231231
232232 SetInstanceMetadata (isolate, arr, this );
@@ -707,7 +707,7 @@ void MetadataNode::SetInnerTypes(Isolate *isolate, Local<Function>& ctorFunction
707707 const auto & children = *treeNode->children ;
708708
709709 // prototype of outer class
710- auto prototypeTemplate2 = ctorFunction->Get (ArgConverter::ConvertToV8String (isolate, " prototype " )).As <Object>();
710+ auto prototypeTemplate2 = ctorFunction->Get (V8StringConstants::GetPrototype (isolate)).As <Object>();
711711
712712 for (auto curChild : children)
713713 {
@@ -857,7 +857,7 @@ void MetadataNode::ExtendedClassConstructorCallback(const v8::FunctionCallbackIn
857857
858858 SetInstanceMetadata (isolate, thiz, extData->node );
859859 thiz->SetInternalField (static_cast <int >(ObjectManager::MetadataNodeKeys::CallSuper), True (isolate));
860- thiz->SetHiddenValue (ArgConverter::ConvertToV8String (isolate, " t::implObj " ), implementationObject);
860+ thiz->SetHiddenValue (V8StringConstants::GetImplementationObject (isolate), implementationObject);
861861
862862 ArgsWrapper argWrapper (info, ArgType::Class);
863863
@@ -929,7 +929,7 @@ void MetadataNode::InterfaceConstructorCallback(const v8::FunctionCallbackInfo<v
929929
930930 implementationObject->SetPrototype (thiz->GetPrototype ());
931931 thiz->SetPrototype (implementationObject);
932- thiz->SetHiddenValue (ArgConverter::ConvertToV8String (isolate, " t::implObj " ), implementationObject);
932+ thiz->SetHiddenValue (V8StringConstants::GetImplementationObject (isolate), implementationObject);
933933
934934 ArgsWrapper argWrapper (info, ArgType::Interface);
935935
@@ -1134,7 +1134,7 @@ Local<Object> MetadataNode::GetImplementationObject(const Local<Object>& object)
11341134
11351135 Local<Object> implementationObject;
11361136
1137- implementationObject = object->GetHiddenValue (ArgConverter::ConvertToV8String (isolate, " t::implObj " )).As <Object>();
1137+ implementationObject = object->GetHiddenValue (V8StringConstants::GetImplementationObject (isolate)).As <Object>();
11381138 if (!implementationObject.IsEmpty ())
11391139 {
11401140 return implementationObject;
@@ -1460,9 +1460,9 @@ void MetadataNode::ExtendMethodCallback(const v8::FunctionCallbackInfo<v8::Value
14601460 extendFuncTemplate->InstanceTemplate ()->SetInternalFieldCount (static_cast <int >(ObjectManager::MetadataNodeKeys::END));
14611461
14621462 auto extendFunc = extendFuncTemplate->GetFunction ();
1463- auto prototypeName = ArgConverter::ConvertToV8String (isolate, " prototype " );
1463+ auto prototypeName = V8StringConstants::GetPrototype (isolate);
14641464 implementationObject->SetPrototype (baseClassCtorFunc->Get (prototypeName));
1465- implementationObject->SetAccessor (ArgConverter::ConvertToV8String (isolate, " super " ), SuperAccessorGetterCallback, nullptr , implementationObject);
1465+ implementationObject->SetAccessor (V8StringConstants::GetSuper (isolate), SuperAccessorGetterCallback, nullptr , implementationObject);
14661466
14671467 auto extendFuncPrototype = extendFunc->Get (prototypeName).As <Object>();
14681468 auto p = extendFuncPrototype->GetPrototype ();
@@ -1797,7 +1797,7 @@ Local<Function> MetadataNode::Wrap(Isolate* isolate, const Local<Function>& f, c
17971797 ret = result.As <Function>();
17981798 ret->Set (ArgConverter::ConvertToV8String (isolate, " __func" ), f);
17991799
1800- auto prototypePropName = ArgConverter::ConvertToV8String (isolate, " prototype " );
1800+ auto prototypePropName = V8StringConstants::GetPrototype (isolate);
18011801 ret->Set (prototypePropName, f->Get (prototypePropName));
18021802 }
18031803 else
0 commit comments