Closed Bug 764456 Opened 12 years ago Closed 12 years ago

Need to ensure that the RHS of "implements" (or any other consequential interface) is not flagged as castable if used as an argument

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 1 obsolete file)

In particular, we need a few changes here: 1) Consequential interfaces need to be flagged as such. 2) Codegen should assert if a consequential interface is used as an argument and is marked as castable. 3) This-unwrapping should stop asserting that the interface being unwrapped to is castable, since it's possible for a concrete interface to be the RHS of implements and hence to require non-castability. 4) Make a clear differentiation between our various interface types. This will somewhat lay the groundwork for bug 742164.
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Attachment #632874 - Flags: review?(khuey) → review?(peterv)
Attachment #632875 - Flags: review?(khuey) → review?(peterv)
Attachment #632876 - Flags: review?(khuey) → review?(peterv)
Attachment #632877 - Attachment is obsolete: true
Attachment #632877 - Flags: review?(khuey)
Part 1 landed as https://hg.mozilla.org/integration/mozilla-inbound/rev/25a6e906d51b because other patches depended on it. Bug remains open for parts 2-4.
Whiteboard: [need review] → [leave open][need review]
Attachment #632874 - Flags: review?(peterv) → review+
Comment on attachment 632875 [details] [diff] [review] part 3. Clean up meaning of 'castable' and use thereof a bit. Review of attachment 632875 [details] [diff] [review]: ----------------------------------------------------------------- Remove castable from addExternalIface.
Attachment #632875 - Flags: review?(peterv) → review+
Comment on attachment 632876 [details] [diff] [review] part 4. Make sure consequential interface used as arguments are non-castable. Review of attachment 632876 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/Codegen.py @@ +2806,5 @@ > + def __init__(self, descriptor): > + self.castable = True > + self.workers = descriptor.workers > + self.nativeType = descriptor.nativeType > + self.name = descriptor.name There are ways to have proxies in python I believe, but I guess that's a bit much for this one use case.
Attachment #632876 - Flags: review?(peterv) → review+
Attachment #634533 - Flags: review?(peterv) → review+
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: