Changeset 249538 in webkit for trunk/Source/JavaScriptCore/runtime/LazyClassStructure.cpp
- Timestamp:
- Sep 5, 2019, 11:47:55 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/LazyClassStructure.cpp
r249175 r249538 61 61 } 62 62 63 void LazyClassStructure::Initializer::setConstructor( PropertyName propertyName,JSObject* constructor)63 void LazyClassStructure::Initializer::setConstructor(JSObject* constructor) 64 64 { 65 65 RELEASE_ASSERT(structure); … … 70 70 71 71 prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); 72 if (!propertyName.isNull())73 global->putDirect(vm, propertyName, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum));74 72 classStructure.m_constructor.set(vm, global, constructor); 75 }76 77 void LazyClassStructure::Initializer::setConstructor(JSObject* constructor)78 {79 String name;80 if (InternalFunction* internalFunction = jsDynamicCast<InternalFunction*>(vm, constructor))81 name = internalFunction->name();82 else if (JSFunction* function = jsDynamicCast<JSFunction*>(vm, constructor))83 name = function->name(vm);84 else85 RELEASE_ASSERT_NOT_REACHED();86 87 setConstructor(Identifier::fromString(vm, name), constructor);88 73 } 89 74
Note:
See TracChangeset
for help on using the changeset viewer.