RESOLVED FIXED 110573
Global constructors should be configurable and not enumerable
https://bugs.webkit.org/show_bug.cgi?id=110573
Summary Global constructors should be configurable and not enumerable
Jungkee Song
Reported 2013-02-22 01:44:50 PST
Steps to reproduce: ProgressEvent CR (http://www.w3.org/TR/progress-events/) test - Test wiki: http://www.w3.org/wiki/Webapps/Interop/ProgressEvents - Test suite: http://w3c-test.org/webapps/ProgressEvents/tests/ - Test case: http://w3c-test.org/webapps/ProgressEvents/tests/submissions/Ms2ger/interface.html (6) Interface objects properties should not be Enumerable Actual results: Test case failed: for (var p in window) { assert_not_equals(p, "ProgressEvent") } this assertion fails. Expected results: ProgressEvent is not enumerable in window object. Hence, the above assertion passes. (See 4.4. Interfaces of WebIDL: http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces)
Attachments
Patch (201.68 KB, patch)
2013-04-17 10:36 PDT, Chris Dumez
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (525.43 KB, application/zip)
2013-04-17 11:57 PDT, Build Bot
no flags
Patch (208.60 KB, patch)
2013-04-17 12:37 PDT, Chris Dumez
no flags
Patch (208.63 KB, patch)
2013-04-17 14:02 PDT, Chris Dumez
ggaren: review+
Patch for landing (208.55 KB, patch)
2013-04-23 14:36 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2013-04-17 07:46:21 PDT
*** Bug 110574 has been marked as a duplicate of this bug. ***
Chris Dumez
Comment 2 2013-04-17 10:36:07 PDT
Ryosuke Niwa
Comment 3 2013-04-17 10:40:36 PDT
I'll be great if we can make this change and make our engine more spec. compliant (or rather interoperate well other other browsers) but I'm a little concerned that there could be some websites that depend on our current behavior. What do other browsers do here? Also, it seems worthwhile to discuss it on webkit-dev.
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 4 2013-04-17 10:42:33 PDT
I believe Gecko should match the spec.
Glenn Adams
Comment 5 2013-04-17 10:42:45 PDT
Comment on attachment 198584 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=198584&action=review > LayoutTests/ChangeLog:14 > + http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces Please cite or refer to the particular spec language that applies here.
Chris Dumez
Comment 6 2013-04-17 10:43:21 PDT
(In reply to comment #3) > I'll be great if we can make this change and make our engine more spec. compliant (or rather interoperate well other other browsers) but I'm a little concerned that there could be some websites that depend on our current behavior. What do other browsers do here? Also, it seems worthwhile to discuss it on webkit-dev. - Firefox follows the spec - Chromium does not follow the spec
Chris Dumez
Comment 7 2013-04-17 10:43:56 PDT
(In reply to comment #5) > (From update of attachment 198584 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=198584&action=review > > > LayoutTests/ChangeLog:14 > > + http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces > > Please cite or refer to the particular spec language that applies here. From 4.4: """ a corresponding property must exist on the ECMAScript global object. The name of the property is the identifier of the interface, and its value is an object called the interface object. The property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }. The characteristics of an interface object are described in section 4.4.1 below. """
Ryosuke Niwa
Comment 8 2013-04-17 10:47:08 PDT
(In reply to comment #6) > (In reply to comment #3) > > I'll be great if we can make this change and make our engine more spec. compliant (or rather interoperate well other other browsers) but I'm a little concerned that there could be some websites that depend on our current behavior. What do other browsers do here? Also, it seems worthwhile to discuss it on webkit-dev. > > - Firefox follows the spec > - Chromium does not follow the spec How about IE? Also, it would be great to refer to a specific version of the spec. you used so that we'll be able to see which spec you've implemented should the spec change in the future ever so slightly.
Glenn Adams
Comment 9 2013-04-17 10:48:15 PDT
(In reply to comment #7) > (In reply to comment #5) > > (From update of attachment 198584 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=198584&action=review > > > > > LayoutTests/ChangeLog:14 > > > + http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces > > > > Please cite or refer to the particular spec language that applies here. > > From 4.4: > """ > a corresponding property must exist on the ECMAScript global object. The name of the property is the identifier of the interface, and its value is an object called the interface object. > > The property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }. The characteristics of an interface object are described in section 4.4.1 below. > """ Thanks. I also wonder if you should test the attributes on the prototype object for these non-callback interfaces: """ Note Since an interface object for a non-callback interface is a function object, it will have a “prototype” property with attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }. """
Chris Dumez
Comment 10 2013-04-17 10:50:56 PDT
(In reply to comment #8) > (In reply to comment #6) > > (In reply to comment #3) > > > I'll be great if we can make this change and make our engine more spec. compliant (or rather interoperate well other other browsers) but I'm a little concerned that there could be some websites that depend on our current behavior. What do other browsers do here? Also, it seems worthwhile to discuss it on webkit-dev. > > > > - Firefox follows the spec > > - Chromium does not follow the spec > > How about IE? Also, it would be great to refer to a specific version of the spec. you used so that we'll be able to see which spec you've implemented should the spec change in the future ever so slightly. IE9 follows partly the spec: - The constructors are not enumerable (OK) - The constructors are not deletable (Not OK) I actually implemented the Editor Draft as the last TR is becoming a bit old. However, this part of the spec has not changed since last publication: http://www.w3.org/TR/2012/CR-WebIDL-20120419/#es-interfaces
Chris Dumez
Comment 11 2013-04-17 10:52:35 PDT
(In reply to comment #9) > (In reply to comment #7) > > (In reply to comment #5) > > > (From update of attachment 198584 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=198584&action=review > > > > > > > LayoutTests/ChangeLog:14 > > > > + http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces > > > > > > Please cite or refer to the particular spec language that applies here. > > > > From 4.4: > > """ > > a corresponding property must exist on the ECMAScript global object. The name of the property is the identifier of the interface, and its value is an object called the interface object. > > > > The property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }. The characteristics of an interface object are described in section 4.4.1 below. > > """ > > Thanks. I also wonder if you should test the attributes on the prototype object for these non-callback interfaces: > > """ > Note > Since an interface object for a non-callback interface is a function object, it will have a “prototype” property with attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }. > """ For now, I'm trying to get the following test cases to pass: http://w3c-test.org/webapps/ProgressEvents/tests/submissions/Ms2ger/interface.html I think it is a good idea to go incrementally.
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 12 2013-04-17 11:12:56 PDT
Please don't reference the TR draft, it's almost a year out of date. If you want a particular revision, you can use <http://dev.w3.org/cvsweb/~checkout~/2006/webapi/WebIDL/Overview.html?rev=1.617;content-type=text%2Fhtml>.
Chris Dumez
Comment 13 2013-04-17 11:34:41 PDT
(In reply to comment #3) > I'll be great if we can make this change and make our engine more spec. compliant (or rather interoperate well other other browsers) but I'm a little concerned that there could be some websites that depend on our current behavior. What do other browsers do here? Also, it seems worthwhile to discuss it on webkit-dev. Agreed. I sent an email to the webkit-dev mailing list.
Build Bot
Comment 14 2013-04-17 11:57:34 PDT
Comment on attachment 198584 [details] Patch Attachment 198584 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/69334 New failing tests: canvas/philip/tests/type.delete.html fast/js/global-constructors-attributes.html fast/js/global-constructors-deletable.html
Build Bot
Comment 15 2013-04-17 11:57:37 PDT
Created attachment 198592 [details] Archive of layout-test-results from webkit-ews-05 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.2
Chris Dumez
Comment 16 2013-04-17 12:37:42 PDT
Created attachment 198595 [details] Patch Should make ews happy.
Chris Dumez
Comment 17 2013-04-17 14:02:57 PDT
Created attachment 198607 [details] Patch Fix Web IDL spec URL in the Changelog to point to the right section.
Chris Dumez
Comment 18 2013-04-23 12:23:09 PDT
ping review?
Geoffrey Garen
Comment 19 2013-04-23 12:36:13 PDT
Comment on attachment 198607 [details] Patch r=me
Chris Dumez
Comment 20 2013-04-23 14:36:07 PDT
Created attachment 199327 [details] Patch for landing
WebKit Commit Bot
Comment 21 2013-04-23 15:33:38 PDT
Comment on attachment 199327 [details] Patch for landing Clearing flags on attachment: 199327 Committed r149001: <http://trac.webkit.org/changeset/149001>
WebKit Commit Bot
Comment 22 2013-04-23 15:33:43 PDT
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 23 2013-04-24 15:05:41 PDT
Removed fast/js/global-constructors.html from TestExpectations in <http://trac.webkit.org/changeset/149068>.
Note You need to log in before you can comment on or make changes to this bug.