Closed Bug 836850 Opened 11 years ago Closed 11 years ago

Make it possible to implement several WebIDL interfaces using the same native class

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: ehsan.akhgari, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently this seems to be impossible due to the PrototypeIdMap, and it looks like that's Ben's fault.  ;-)

You can see the resulting ugliness in my upcoming patch to bug 836599.
So turns out we had code that tried to make this work... it was just buggy.  Patch coming up.
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Blocks: 839116
Comment on attachment 711379 [details] [diff] [review]
Patch and use of the new ability for sharedlist

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

::: dom/bindings/Configuration.py
@@ +60,3 @@
>              otherDescriptors = [d for d in self.descriptors
> +                                if d.nativeType == nativeType]
> +            descriptor.unsharedImplementation = len(otherDescriptors) == 1

Maybe:

any(d.nativeType == descriptor.nativeType and d != descriptor for d in self.descriptors)?
Attachment #711379 - Flags: review?(peterv) → review+
> Maybe:

I'd need a negation of that, so I wrote it like so:

            descriptor.unsharedImplementation = all(
                d.nativeType != descriptor.nativeType or d == descriptor
                for d in self.descriptors)
https://hg.mozilla.org/integration/mozilla-inbound/rev/d32064860f36
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla21
https://hg.mozilla.org/mozilla-central/rev/d32064860f36
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Blocks: 836599
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: