Changeset 46598 in webkit for trunk/JavaScriptCore/runtime/PropertySlot.h
- Timestamp:
- Jul 30, 2009, 1:57:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/PropertySlot.h
r44757 r46598 24 24 #include "Identifier.h" 25 25 #include "JSValue.h" 26 #include "JSImmediate.h"27 26 #include "Register.h" 28 27 #include <wtf/Assertions.h> … … 40 39 public: 41 40 PropertySlot() 42 : m_offset(WTF::notFound)43 {44 clear Base();41 { 42 clearBase(); 43 clearOffset(); 45 44 clearValue(); 46 45 } … … 48 47 explicit PropertySlot(const JSValue base) 49 48 : m_slotBase(base) 50 , m_offset(WTF::notFound)51 {49 { 50 clearOffset(); 52 51 clearValue(); 53 52 } … … 83 82 { 84 83 ASSERT(valueSlot); 85 m_getValue = JSC_VALUE_SLOT_MARKER; 86 clearBase(); 84 clearBase(); 85 clearOffset(); 86 m_getValue = JSC_VALUE_SLOT_MARKER; 87 87 m_data.valueSlot = valueSlot; 88 88 } … … 108 108 { 109 109 ASSERT(value); 110 m_getValue = JSC_VALUE_SLOT_MARKER; 111 clearBase(); 110 clearBase(); 111 clearOffset(); 112 m_getValue = JSC_VALUE_SLOT_MARKER; 112 113 m_value = value; 113 114 m_data.valueSlot = &m_value; … … 117 118 { 118 119 ASSERT(registerSlot); 120 clearBase(); 121 clearOffset(); 119 122 m_getValue = JSC_REGISTER_SLOT_MARKER; 120 clearBase();121 123 m_data.registerSlot = registerSlot; 122 124 } … … 148 150 void setUndefined() 149 151 { 150 clearBase();151 152 setValue(jsUndefined()); 152 153 } … … 154 155 JSValue slotBase() const 155 156 { 156 ASSERT(m_slotBase);157 157 return m_slotBase; 158 158 } … … 177 177 m_value = JSValue(); 178 178 #endif 179 } 180 181 void clearOffset() 182 { 183 // Clear offset even in release builds, in case this PropertySlot has been used before. 184 // (For other data members, we don't need to clear anything because reuse would meaningfully overwrite them.) 185 m_offset = WTF::notFound; 179 186 } 180 187
Note:
See TracChangeset
for help on using the changeset viewer.