|
Lines 151-156
bool GenericArguments<Type>::deleteProperty(JSCell* cell, ExecState* exec, Prope
a/Source/JavaScriptCore/runtime/GenericArgumentsInlines.h_sec1
|
| 151 |
|| ident == vm.propertyNames->iteratorSymbol)) |
151 |
|| ident == vm.propertyNames->iteratorSymbol)) |
| 152 |
thisObject->overrideThings(vm); |
152 |
thisObject->overrideThings(vm); |
| 153 |
|
153 |
|
|
|
154 |
PropertyDescriptor descriptor; |
| 155 |
thisObject->getOwnPropertyDescriptor(exec, ident, descriptor); |
| 156 |
|
| 157 |
if (!descriptor.configurable()) |
| 158 |
return false; |
| 159 |
|
| 154 |
Optional<uint32_t> index = parseIndex(ident); |
160 |
Optional<uint32_t> index = parseIndex(ident); |
| 155 |
if (index && thisObject->canAccessIndexQuickly(index.value())) { |
161 |
if (index && thisObject->canAccessIndexQuickly(index.value())) { |
| 156 |
thisObject->overrideArgument(vm, index.value()); |
162 |
thisObject->overrideArgument(vm, index.value()); |
|
Lines 165-176
bool GenericArguments<Type>::deletePropertyByIndex(JSCell* cell, ExecState* exec
a/Source/JavaScriptCore/runtime/GenericArgumentsInlines.h_sec2
|
| 165 |
{ |
171 |
{ |
| 166 |
Type* thisObject = jsCast<Type*>(cell); |
172 |
Type* thisObject = jsCast<Type*>(cell); |
| 167 |
VM& vm = exec->vm(); |
173 |
VM& vm = exec->vm(); |
| 168 |
|
174 |
|
|
|
175 |
PropertyDescriptor descriptor; |
| 176 |
thisObject->getOwnPropertyDescriptor(exec, jsNumber(index).toPropertyKey(exec), descriptor); |
| 177 |
|
| 178 |
if (!descriptor.configurable()) |
| 179 |
return false; |
| 180 |
|
| 169 |
if (thisObject->canAccessIndexQuickly(index)) { |
181 |
if (thisObject->canAccessIndexQuickly(index)) { |
| 170 |
thisObject->overrideArgument(vm, index); |
182 |
thisObject->overrideArgument(vm, index); |
| 171 |
return true; |
183 |
return true; |
| 172 |
} |
184 |
} |
| 173 |
|
185 |
|
| 174 |
return Base::deletePropertyByIndex(cell, exec, index); |
186 |
return Base::deletePropertyByIndex(cell, exec, index); |
| 175 |
} |
187 |
} |
| 176 |
|
188 |
|
|
Lines 202-214
bool GenericArguments<Type>::defineOwnProperty(JSObject* object, ExecState* exec
a/Source/JavaScriptCore/runtime/GenericArgumentsInlines.h_sec3
|
| 202 |
if (descriptor.writable()) |
214 |
if (descriptor.writable()) |
| 203 |
return true; |
215 |
return true; |
| 204 |
} |
216 |
} |
| 205 |
|
217 |
|
| 206 |
// If the property is a non-deleted argument, then move it into the base object and |
218 |
if (!descriptor.writablePresent() || !descriptor.writable()) { |
| 207 |
// then delete it. |
219 |
// If the property is a non-deleted argument, then move it into the base object and |
| 208 |
JSValue value = thisObject->getIndexQuickly(index); |
220 |
// then delete it. |
| 209 |
ASSERT(value); |
221 |
JSValue value = thisObject->getIndexQuickly(index); |
| 210 |
object->putDirectMayBeIndex(exec, ident, value); |
222 |
ASSERT(value); |
| 211 |
thisObject->overrideArgument(vm, index); |
223 |
object->putDirectMayBeIndex(exec, ident, value); |
|
|
224 |
thisObject->overrideArgument(vm, index); |
| 225 |
} |
| 212 |
} |
226 |
} |
| 213 |
} |
227 |
} |
| 214 |
|
228 |
|