Store m_target of WeakRefObject as weak reference

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2021-02-02 15:00:33 +09:00 committed by Hyukwoo Park
commit 390261326e
12 changed files with 199 additions and 14 deletions

View file

@ -412,6 +412,12 @@ PersistentRefHolder<ContextRef> createEscargotContext(VMInstanceRef* instance)
{
ObjectRef* dollor262Object = ObjectRef::create(state);
{
FunctionObjectRef::NativeFunctionInfo nativeFunctionInfo(AtomicStringRef::create(context, "gc"), builtinGc, 0, true, false);
FunctionObjectRef* buildFunctionObjectRef = FunctionObjectRef::create(state, nativeFunctionInfo);
dollor262Object->defineDataProperty(state, StringRef::createFromASCII("gc"), buildFunctionObjectRef, true, true, true);
}
{
FunctionObjectRef::NativeFunctionInfo nativeFunctionInfo(AtomicStringRef::create(context, "createRealm"), builtin262CreateRealm, 0, true, false);
FunctionObjectRef* buildFunctionObjectRef = FunctionObjectRef::create(state, nativeFunctionInfo);