Changeset 116670 in webkit for trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
- Timestamp:
- May 10, 2012, 11:40:29 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r112285 r116670 113 113 } 114 114 115 Structure* JSFunction::cacheInheritorID(ExecState* exec) 116 { 117 JSValue prototype = get(exec, exec->globalData().propertyNames->prototype); 118 if (prototype.isObject()) 119 m_cachedInheritorID.set(exec->globalData(), this, asObject(prototype)->inheritorID(exec->globalData())); 120 else 121 m_cachedInheritorID.set(exec->globalData(), this, globalObject()->emptyObjectStructure()); 122 return m_cachedInheritorID.get(); 123 } 124 115 125 const UString& JSFunction::name(ExecState* exec) 116 126 { … … 333 343 PropertySlot slot; 334 344 thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot); 345 thisObject->m_cachedInheritorID.clear(); 335 346 } 336 347 if (thisObject->jsExecutable()->isStrictMode() && (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().caller)) { … … 373 384 PropertySlot slot; 374 385 thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot); 386 thisObject->m_cachedInheritorID.clear(); 375 387 return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException); 376 388 }
Note:
See TracChangeset
for help on using the changeset viewer.