Changeset 60390 in webkit for trunk/JavaScriptCore/runtime/JSObject.h
- Timestamp:
- May 28, 2010, 11:16:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSObject.h
r59941 r60390 89 89 JSValue prototype() const; 90 90 void setPrototype(JSValue prototype); 91 bool setPrototypeWithCycleCheck(JSValue prototype); 91 92 92 93 void setStructure(NonNullPassRefPtr<Structure>); … … 311 312 { 312 313 return m_structure->storedPrototype(); 314 } 315 316 inline bool JSObject::setPrototypeWithCycleCheck(JSValue prototype) 317 { 318 JSValue nextPrototypeValue = prototype; 319 while (nextPrototypeValue && nextPrototypeValue.isObject()) { 320 JSObject* nextPrototype = asObject(nextPrototypeValue)->unwrappedObject(); 321 if (nextPrototype == this) 322 return false; 323 nextPrototypeValue = nextPrototype->prototype(); 324 } 325 setPrototype(prototype); 326 return true; 313 327 } 314 328
Note:
See TracChangeset
for help on using the changeset viewer.