Changeset 180173 in webkit for trunk/Source/JavaScriptCore/runtime/Structure.cpp
- Timestamp:
- Feb 16, 2015, 2:10:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r179429 r180173 1060 1060 } 1061 1061 1062 bool foundCtorName = false; 1063 if (JSObject* profilingVal = curValue.getObject()) { 1064 ExecState* exec = profilingVal->globalObject()->globalExec(); 1065 PropertySlot slot(storedPrototype()); 1066 PropertyName constructor(exec->propertyNames().constructor); 1067 if (profilingVal->getPropertySlot(exec, constructor, slot)) { 1068 if (slot.isValue()) { 1069 JSValue constructorValue = slot.getValue(exec, constructor); 1070 if (constructorValue.isCell()) { 1071 if (JSCell* constructorCell = constructorValue.asCell()) { 1072 if (JSObject* ctorObject = constructorCell->getObject()) { 1073 if (JSFunction* constructorFunction = jsDynamicCast<JSFunction*>(ctorObject)) { 1074 curShape->setConstructorName(constructorFunction->calculatedDisplayName(exec)); 1075 foundCtorName = true; 1076 } else if (InternalFunction* constructorFunction = jsDynamicCast<InternalFunction*>(ctorObject)) { 1077 curShape->setConstructorName(constructorFunction->calculatedDisplayName(exec)); 1078 foundCtorName = true; 1079 } 1080 } 1081 } 1082 } 1083 } 1084 } 1085 } 1086 1087 if (!foundCtorName) 1062 1063 if (JSObject* curObject = curValue.getObject()) 1064 curShape->setConstructorName(JSObject::calculatedClassName(curObject)); 1065 else 1088 1066 curShape->setConstructorName(curStructure->classInfo()->className); 1089 1067
Note:
See TracChangeset
for help on using the changeset viewer.