Changeset 47022 in webkit for trunk/JavaScriptCore/runtime/JSPropertyNameIterator.h
- Timestamp:
- Aug 10, 2009, 9:35:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSPropertyNameIterator.h
r44224 r47022 1 1 /* 2 * Copyright (C) 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 52 52 virtual JSObject* toObject(ExecState*) const; 53 53 54 virtual void mark ();54 virtual void markChildren(MarkStack&); 55 55 56 56 JSValue next(ExecState*); 57 57 void invalidate(); 58 58 59 static PassRefPtr<Structure> createStructure(JSValue prototype) 60 { 61 return Structure::create(prototype, TypeInfo(CompoundType)); 62 } 59 63 private: 60 JSPropertyNameIterator( );61 JSPropertyNameIterator( JSObject*, PassRefPtr<PropertyNameArrayData> propertyNameArrayData);64 JSPropertyNameIterator(ExecState*); 65 JSPropertyNameIterator(ExecState*, JSObject*, PassRefPtr<PropertyNameArrayData> propertyNameArrayData); 62 66 63 67 JSObject* m_object; … … 67 71 }; 68 72 69 inline JSPropertyNameIterator::JSPropertyNameIterator( )70 : JSCell( 0)73 inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec) 74 : JSCell(exec->globalData().propertyNameIteratorStructure.get()) 71 75 , m_object(0) 72 76 , m_position(0) … … 75 79 } 76 80 77 inline JSPropertyNameIterator::JSPropertyNameIterator( JSObject* object, PassRefPtr<PropertyNameArrayData> propertyNameArrayData)78 : JSCell( 0)81 inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, JSObject* object, PassRefPtr<PropertyNameArrayData> propertyNameArrayData) 82 : JSCell(exec->globalData().propertyNameIteratorStructure.get()) 79 83 , m_object(object) 80 84 , m_data(propertyNameArrayData) … … 87 91 { 88 92 if (v.isUndefinedOrNull()) 89 return new (exec) JSPropertyNameIterator ;93 return new (exec) JSPropertyNameIterator(exec); 90 94 91 95 JSObject* o = v.toObject(exec); 92 96 PropertyNameArray propertyNames(exec); 93 97 o->getPropertyNames(exec, propertyNames); 94 return new (exec) JSPropertyNameIterator( o, propertyNames.releaseData());98 return new (exec) JSPropertyNameIterator(exec, o, propertyNames.releaseData()); 95 99 } 96 100
Note:
See TracChangeset
for help on using the changeset viewer.