Bug 78777 - Numerous trivial bugs in Object.defineProperty
Summary: Numerous trivial bugs in Object.defineProperty
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
Depends on:
Reported: 2012-02-15 21:47 PST by Gavin Barraclough
Modified: 2012-02-16 11:07 PST (History)
2 users (show)

See Also:

Fix (41.59 KB, patch)
2012-02-15 21:49 PST, Gavin Barraclough
no flags Details | Formatted Diff | Diff
With fixed Changelog (41.59 KB, patch)
2012-02-15 21:50 PST, Gavin Barraclough
sam: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2012-02-15 21:47:09 PST
There are a handful of really trivial bugs, related to Object.defineProperty:
    * Redefining an accessor with different attributes changes the attributes, but not the get/set functions!
    * Calling an undefined setter should only throw in strict mode.
    * When redefining an accessor to a data decriptor, if writable is not specified we should default to false.
    * Any attempt to redefine a non-configurable property of an array as configurable should be rejected.
    * Object.defineProperties should call toObject on 'Properties' argument, rather than throwing if it is not an object.
    * If preventExtensions has been called on an array, subsequent assignment beyond array bounds should fail.
    * 'isFrozen' shouldn't be checking the ReadOnly bit for accessor descriptors (we presently always keep this bit as 'false').
    * Should be able to redefine an non-writable, non-configurable property, with the same value and attributes.
    * Should be able to define an non-configurable accessor.
These are mostly all one-line changes, inverted boolean checks, masking against wrong attribute, etc.

Fixing these would resolve about 80% of our outstanding test-262 failures.
Comment 1 Gavin Barraclough 2012-02-15 21:49:05 PST
Created attachment 127309 [details]
Comment 2 Gavin Barraclough 2012-02-15 21:50:51 PST
Created attachment 127310 [details]
With fixed Changelog
Comment 3 WebKit Review Bot 2012-02-16 03:26:19 PST
Comment on attachment 127310 [details]
With fixed Changelog

Attachment 127310 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11536144

New failing tests:
Comment 4 Gavin Barraclough 2012-02-16 11:07:00 PST
Fixed in r107956