Closed Bug 793011 Opened 14 years ago Closed 14 years ago

Bad error message when adding a typedef name to Bindings.conf

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 792980

People

(Reporter: ehsan.akhgari, Assigned: khuey)

Details

Attachments

(1 file)

Add a webidl file containing this: interface mozFoo {}; typedef mozFoo Foo; And in Bindings.conf, add and entry for "Foo" (not "mozFoo"). Here's what you'll end up getting: Traceback (most recent call last): File "/Users/ehsanakhgari/moz/mozilla-central/config/pythonpath.py", line 56, in <module> main(sys.argv[1:]) File "/Users/ehsanakhgari/moz/mozilla-central/config/pythonpath.py", line 48, in main execfile(script, frozenglobals) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/GlobalGen.py", line 80, in <module> main() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/GlobalGen.py", line 67, in main config = Configuration(configFile, parserResults) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Configuration.py", line 34, in __init__ self.descriptors.extend([Descriptor(self, iface, x) for x in entry]) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Configuration.py", line 131, in __init__ if self.interface.isExternal() or self.interface.isCallback(): AttributeError: 'IDLTypedefType' object has no attribute 'isExternal' make[6]: *** [ParserResults.pkl] Error 1 make[6]: *** Deleting file `ParserResults.pkl' make[5]: *** [bindings_export] Error 2 make[4]: *** [export_tier_platform] Error 2 make[3]: *** [tier_platform] Error 2 make[2]: *** [default] Error 2 make[1]: *** [realbuild] Error 2 make: *** [build] Error 2
Ugh. I think we should replace 26 if not thing.isInterface(): continue with if not isInstance(thing, IDLInterface): continue because types have an isInterface method, and will test True if they are interface types.
Fun. Yeah, makes sense to me. Kyle, want to patch? I'll review.
Attached patch Patch — — Splinter Review
Assignee: nobody → khuey
Status: NEW → ASSIGNED
Attachment #663557 - Flags: review?(bzbarsky)
Comment on attachment 663557 [details] [diff] [review] Patch r=me. I ended up doing more or less the same in bug 792980...
Attachment #663557 - Flags: review?(bzbarsky) → review+
Ok, we can just land your patch then. No point in bitrotting you.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
I'm fine with this landing now and merging as needed, fwiw. That other patch might take some convincing to get reviews...
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: