[Webkit-unassigned] [Bug 159398] [test262] Fixing mapped arguments object property test case

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 26 11:47:32 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=159398

--- Comment #25 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 283766
  --> https://bugs.webkit.org/attachment.cgi?id=283766
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283766&action=review

It looks like you've invented a way for the arguments object to override an indexed property by storing a value in its JSObject storage. The arguments object already had a different way to indicate that an indexed property had been overridden: the "overrideArgument" mechanism. Did you consider using the overrideArgument mechanism? What's better about this new mechanism? That's a good thing to explain in your ChangeLog.

I suspect that it might be better to use the overrideArgument mechanism, or to augment it for this purpose.

> Source/JavaScriptCore/ChangeLog:9
> +        mapped arguments object with non-configurable and no-writable property

non-writable

> Source/JavaScriptCore/ChangeLog:10
> +        cases. Also it is fixing cases where arguments[i] cannot be deleted 

fixes

> Source/JavaScriptCore/ChangeLog:11
> +        when argument "i" is not configurable. The test cases added are from

from the

> Source/JavaScriptCore/runtime/GenericArgumentsInlines.h:222
> +                    object->putDirectMayBeIndex(exec, ident, value);
> +
> +                    return Base::defineOwnProperty(object, exec, ident, descriptor, shouldThrow);

This looks wrong. You're assigning the property twice -- first by putDirectMayBeIndex and second by defineOwnProperty.

Also, you don't seem to invoke the "overrideArgument" mechanism, which is what we usually use to indicate that something strange has happened to an indexed property.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160726/ef91110b/attachment-0001.html>


More information about the webkit-unassigned mailing list