Implement [LegacyUnenumerableNamedProperties] in IDL

RESOLVED FIXED in Firefox 49

Status

()

Core
DOM
RESOLVED FIXED
2 years ago
10 months ago

People

(Reporter: bz, Assigned: bz)

Tracking

(Blocks: 1 bug)

Trunk
mozilla49
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fixed)

Details

(Whiteboard: btpp-active)

Attachments

(5 attachments)

See https://github.com/heycam/webidl/pull/91

The idea is that instead of asking the object on a per-name basis whether it's enumerable or not, we just annotate in the IDL whether the named props are enumerable.  Then we can have codegen do the right thing and I think we can get rid of both NameIsEnumerable() on various classes and the flags argument to GetSupportedNames.
Created attachment 8749047 [details] [diff] [review]
part 1.  Add IDL parser support for [LegacyUnenumerableNamedProperties]
Attachment #8749047 - Flags: review?(peterv)
Created attachment 8749048 [details] [diff] [review]
part 2.  Add [LegacyUnenumerableNamedProperties] to the interfaces that specify it in DOM and HTML
Attachment #8749048 - Flags: review?(peterv)
Created attachment 8749049 [details] [diff] [review]
part 3.  Add a way to ask an interface descriptor for a proxy whether its named props should be enumerable
Attachment #8749049 - Flags: review?(peterv)
Created attachment 8749051 [details] [diff] [review]
part 4.  Use LegacyUnenumerableNamedProperties instead of NameIsEnumerable() calls to determine whether named props on DOM proxies should be enumerable
Attachment #8749051 - Flags: review?(peterv)
Created attachment 8749053 [details] [diff] [review]
part 5.  Use LegacyUnenumerableNamedProperties instead of passing flags to GetSupportedNames to determine whether named props on DOM proxies should be reflected in ownPropertyKeys
Attachment #8749053 - Flags: review?(peterv)
Whiteboard: btpp-active
Attachment #8749047 - Flags: review?(peterv) → review+
Comment on attachment 8749048 [details] [diff] [review]
part 2.  Add [LegacyUnenumerableNamedProperties] to the interfaces that specify it in DOM and HTML

Review of attachment 8749048 [details] [diff] [review]:
-----------------------------------------------------------------

Window seems to be missing though?
Attachment #8749048 - Flags: review?(peterv) → review+
Attachment #8749049 - Flags: review?(peterv) → review+
Attachment #8749051 - Flags: review?(peterv) → review+
> Window seems to be missing though?

Yeah, we don't codegen the proxy for Window, because it's the named properties handler instead.

I could add it there, and I guess I should, but it won't do anything.
Comment on attachment 8749053 [details] [diff] [review]
part 5.  Use LegacyUnenumerableNamedProperties instead of passing flags to GetSupportedNames to determine whether named props on DOM proxies should be reflected in ownPropertyKeys

Review of attachment 8749053 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsMimeTypeArray.cpp
@@ +130,5 @@
>    return mMimeTypes.Length();
>  }
>  
>  void
> +nsMimeTypeArray::GetSupportedNames(nsTArray< nsString >& aRetval)

Maybe remove the spaces inside <> here too?
Attachment #8749053 - Flags: review?(peterv) → review+

Comment 13

2 years ago
Either this bug or bug 1268047 regressed being able to upload photos to dpreview.com photography community forums. See bug 1310414.
You need to log in before you can comment on or make changes to this bug.