Bug 159576 - Object.defineProperty() should maintain existing getter / setter if not overridden in the new descriptor
Summary: Object.defineProperty() should maintain existing getter / setter if not overr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2016-07-08 12:29 PDT by Chris Dumez
Modified: 2016-07-08 13:53 PDT (History)
10 users (show)

See Also:


Attachments
Patch (11.40 KB, patch)
2016-07-08 12:39 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (1.02 MB, application/zip)
2016-07-08 13:19 PDT, Build Bot
no flags Details
Patch (11.41 KB, patch)
2016-07-08 13:20 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-08 12:29:06 PDT
Object.defineProperty() should maintain existing getter / setter if not overridden in the new descriptor. Currently, if the property is a has a custom getter / setter, and if the new descriptor only has a setter (or only a getter), it will clear the existing getter (or setter).

This breaks search suggestions and the search button on www.iciba.com.
Comment 1 Chris Dumez 2016-07-08 12:29:32 PDT
<rdar://problem/27242197>
Comment 2 Chris Dumez 2016-07-08 12:39:21 PDT
Created attachment 283191 [details]
Patch
Comment 3 Mark Lam 2016-07-08 12:43:41 PDT
Comment on attachment 283191 [details]
Patch

r=me
Comment 4 Build Bot 2016-07-08 13:18:57 PDT
Comment on attachment 283191 [details]
Patch

Attachment 283191 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1648463

New failing tests:
js/dom/customAccessor-defineProperty_setterOnly.html
js/dom/customAccessor-defineProperty.html
js/dom/customAccessor-defineProperty_getterOnly.html
Comment 5 Build Bot 2016-07-08 13:19:02 PDT
Created attachment 283193 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Chris Dumez 2016-07-08 13:20:59 PDT
Created attachment 283194 [details]
Patch
Comment 7 Chris Dumez 2016-07-08 13:52:56 PDT
Comment on attachment 283194 [details]
Patch

Clearing flags on attachment: 283194

Committed r203004: <http://trac.webkit.org/changeset/203004>
Comment 8 Chris Dumez 2016-07-08 13:53:01 PDT
All reviewed patches have been landed.  Closing bug.