Closed Bug 784701 Opened 12 years ago Closed 11 years ago

Remove WebIDL userdata

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: khuey, Assigned: khuey)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
It only has one use, and it's kind of ugly, so lets ditch it.
Attachment #654234 - Flags: review?(justin.lebar+bug)
>         # If we're concrete, we need to crawl our ancestor interfaces and mark
>         # them as having a concrete descendant.
>         self.concrete = desc.get('concrete', True)
>         if self.concrete:
>             iface = self.interface
>             while iface:
>-                iface.setUserData('hasConcreteDescendant', True)
>+                if iface.isExternal():
>+                    break

It's not clear to me why we should stop the first external interface in the parent chain.

>+                iface.setHasConcreteDescendant(True)

iface.hasConcreteDescendent = True would be more Pythonic, I think.  You could
always make hasConcreteDescendent a property at some point in the future, if
you wanted to take some action when the value was set.
Attachment #654234 - Flags: review?(justin.lebar+bug) → review+
You can't have an external interface with a real interface parent, afaik.

hasConcreteDescendant is more pythonic, but elsewhere we've used the setFoo stuff.
> but elsewhere we've used the setFoo stuff.

It's only setIsConsequentialInterfaceOf, and setCallback (which should be called setIsCallback), afaict.  What if I volunteered to fix those two?
Comment on attachment 654234 [details] [diff] [review]
Patch

If a concrete interface inherits from an external interface, don't we just want to throw?
(In reply to Justin Lebar [:jlebar] from comment #3)
> > but elsewhere we've used the setFoo stuff.
> 
> It's only setIsConsequentialInterfaceOf, and setCallback (which should be
> called setIsCallback), afaict.  What if I volunteered to fix those two?

I'd be fine with that.  I'm mostly interested in consistency.
Actually, seIsConsequentialInterfaceOf(x) is not the same type of thing -- it's basically self.myConsequentialInterfaces.append(x).  So it's just the isCallback guy.
And if we made isCallback a property, we'd have to change isDictionary, isInterface...I guess that's a job for later.  :)
Attached patch PatchSplinter Review
Attachment #654234 - Attachment is obsolete: true
Attachment #654247 - Flags: review+
(In reply to Boris Zbarsky (:bz) [In and out Aug 1 - 10, out Aug 11-20] from comment #4)
> Comment on attachment 654234 [details] [diff] [review]
> Patch
> 
> If a concrete interface inherits from an external interface, don't we just
> want to throw?

Done.
We're using this for things now.  May want to revisit it later but it's not important.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
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: