Summary: | Global constructors should be configurable and not enumerable | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jungkee Song <jungkees> | ||||||||||||
Component: | WebCore Misc. | Assignee: | Chris Dumez <cdumez> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | ap, buildbot, cdumez, commit-queue, d-r, ggaren, glenn, gyuyoung.kim, hojong.han, jungkee.song, jussi.kukkonen, kihong.kwon, laszlo.gombos, Ms2ger, rakuco, rniwa | ||||||||||||
Priority: | P2 | Keywords: | WebExposed | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | Unspecified | ||||||||||||||
URL: | http://dev.w3.org/cvsweb/~checkout~/2006/webapi/WebIDL/Overview.html?rev=1.617;content-type=text%2Fhtml#es-interfaces | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 115235 | ||||||||||||||
Attachments: |
|
Description
Jungkee Song
2013-02-22 01:44:50 PST
*** Bug 110574 has been marked as a duplicate of this bug. *** Created attachment 198584 [details]
Patch
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. I believe Gecko should match the spec. 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. (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 (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. """ (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. (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 }. """ (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 (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. 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>. (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. 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 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
Created attachment 198595 [details]
Patch
Should make ews happy.
Created attachment 198607 [details]
Patch
Fix Web IDL spec URL in the Changelog to point to the right section.
ping review? Comment on attachment 198607 [details]
Patch
r=me
Created attachment 199327 [details]
Patch for landing
Comment on attachment 199327 [details] Patch for landing Clearing flags on attachment: 199327 Committed r149001: <http://trac.webkit.org/changeset/149001> All reviewed patches have been landed. Closing bug. Removed fast/js/global-constructors.html from TestExpectations in <http://trac.webkit.org/changeset/149068>. |