41 : JSObject(structure) |
41 : JSObject(structure) |
42 { |
42 { |
43 putDirect(globalData->propertyNames->name, jsString(globalData, name.ustring()), DontDelete | ReadOnly | DontEnum); |
43 putDirect(globalData->propertyNames->name, jsString(globalData, name.ustring()), DontDelete | ReadOnly | DontEnum); |
44 } |
44 } |
45 |
45 |
46 const UString& InternalFunction::name(JSGlobalData* globalData) |
46 const UString& InternalFunction::name(ExecState* exec) |
47 { |
47 { |
48 return asString(getDirect(globalData->propertyNames->name))->value(); |
48 return asString(getDirect(exec->globalData().propertyNames->name))->value(exec); |
49 } |
49 } |
50 |
50 |
51 const UString InternalFunction::displayName(JSGlobalData* globalData) |
51 const UString InternalFunction::displayName(ExecState* exec) |
52 { |
52 { |
53 JSValue displayName = getDirect(globalData->propertyNames->displayName); |
53 JSValue displayName = getDirect(exec->globalData().propertyNames->displayName); |
54 |
54 |
55 if (displayName && isJSString(globalData, displayName)) |
55 if (displayName && isJSString(&exec->globalData(), displayName)) |
56 return asString(displayName)->value(); |
56 return asString(displayName)->value(exec); |
57 |
57 |
58 return UString::null(); |
58 return UString::null(); |
59 } |
59 } |
60 |
60 |
61 const UString InternalFunction::calculatedDisplayName(JSGlobalData* globalData) |
61 const UString InternalFunction::calculatedDisplayName(ExecState* exec) |
62 { |
62 { |
63 const UString explicitName = displayName(globalData); |
63 const UString explicitName = displayName(exec); |
64 |
64 |
65 if (!explicitName.isEmpty()) |
65 if (!explicitName.isEmpty()) |
66 return explicitName; |
66 return explicitName; |
67 |
67 |
68 return name(globalData); |
68 return name(exec); |
69 } |
69 } |
70 |
70 |
71 } // namespace JSC |
71 } // namespace JSC |