| Differences between
and this patch
- a/Source/JavaScriptCore/ChangeLog +17 lines
Lines 1-3 a/Source/JavaScriptCore/ChangeLog_sec1
1
2016-07-04  Caio Lima  <ticaiolima@gmail.com>
2
3
        [test262] Fixing "Mapped arguments object with non-configurable property" test case
4
        https://bugs.webkit.org/show_bug.cgi?id=159398
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        This patches fixes some test cases of ECMAScript test262 suite of
9
        Mapped arguments object with non-configurable property case. Also it
10
        is fixing cases where arguments[i] cannot be deleted when "i" is not
11
        configurable.
12
13
        * runtime/GenericArgumentsInlines.h:
14
        (JSC::GenericArguments<Type>::deleteProperty):
15
        (JSC::GenericArguments<Type>::deletePropertyByIndex):
16
        (JSC::GenericArguments<Type>::defineOwnProperty):
17
1
2016-07-03  Per Arne Vollan  <pvollan@apple.com>
18
2016-07-03  Per Arne Vollan  <pvollan@apple.com>
2
19
3
        [Win] DLLs are missing version information.
20
        [Win] DLLs are missing version information.
- a/Source/JavaScriptCore/runtime/GenericArgumentsInlines.h -9 / +23 lines
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
    

Return to Bug 159398