Closed
Bug 1136858
Opened 11 years ago
Closed 10 years ago
'using' a type which doesn't exist in an IPDL file causes a weird exception
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jdm, Assigned: mprsai, Mentored)
Details
(Whiteboard: [lang=py][good first bug])
Attachments
(2 files)
I added `using mozilla::dom::SericeWorkerId from "mozilla/dom/ipc/IdType.h";` to PNecko.ipdl, and got this exception:
> 0:07.48 Traceback (most recent call last):
> 0:07.48 File "/Users/jdm/src/mozilla-central/config/pythonpath.py", line 56, in <module>
> 0:07.48 main(sys.argv[1:])
> 0:07.48 File "/Users/jdm/src/mozilla-central/config/pythonpath.py", line 48, in main
> 0:07.49 execfile(script, frozenglobals)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl.py", line 132, in <module>
> 0:07.49 if not ipdl.typecheck(ast):
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/__init__.py", line 35, in typecheck
> 0:07.49 There are no private exports.
> 0:07.49 return TypeCheck().check(ast, errout)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 616, in check
> 0:07.49 if not runpass(GatherDecls(builtinUsing, self.errors)):
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 608, in runpass
> 0:07.49 tu.accept(tcheckpass)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 714, in visitTranslationUnit
> 0:07.49 pinc.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 778, in visitInclude
> 0:07.49 cd store; /Applications/Xcode.app/Contents/Developer/usr/bin/make private_export
> 0:07.49 inc.tu.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 714, in visitTranslationUnit
> 0:07.49 pinc.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 778, in visitInclude
> 0:07.49 inc.tu.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 714, in visitTranslationUnit
> 0:07.49 pinc.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 778, in visitInclude
> 0:07.49 inc.tu.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 714, in visitTranslationUnit
> 0:07.49 pinc.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.49 return visit(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 778, in visitInclude
> 0:07.49 inc.tu.accept(self)
> 0:07.49 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/ast.py", line 139, in accept
> 0:07.50 return visit(self)
> 0:07.50 File "/Users/jdm/src/mozilla-central/ipc/ipdl/ipdl/type.py", line 731, in visitTranslationUnit
> 0:07.50 There are no private exports.
> 0:07.50 if inc.tu.filetype == 'header':
> 0:07.50 AttributeError: 'NoneType' object has no attribute 'filetype'
It would be worth figuring out what happens if we null-check inc.tu instead.
Comment 1•11 years ago
|
||
Hi, I would like to work on this. So, the fix could be remplace "inc.tu.filetype == 'header'" with "inc.tu == null"?
Flags: needinfo?(josh)
| Reporter | ||
Comment 2•11 years ago
|
||
Replacing that doesn't make sense, since it's a real check we want to keep. I'm curious about how the output changes if we do null-check inc.tu before checking the filetype property, however.
Flags: needinfo?(josh)
Comment 3•11 years ago
|
||
Haaa ok, now I understand the bug. :)
Could you tell me how run the test you run to check the output with the changes?
Flags: needinfo?(josh)
| Reporter | ||
Comment 4•11 years ago
|
||
Just add the incorrect code that I mentioned in the first comment to any IPDL file in the tree, and then run ./mach build.
Flags: needinfo?(josh)
Updated•11 years ago
|
Assignee: nobody → gioyik
Comment 6•11 years ago
|
||
Yes, I added what you comment in "netwerk/ipc/PNecko.ipdl" and I got this. I attach the log.
Comment 7•11 years ago
|
||
Updated•11 years ago
|
Flags: needinfo?(gioyik) → needinfo?(josh)
| Reporter | ||
Updated•11 years ago
|
Attachment #8582131 -
Attachment mime type: text/x-log → text/plain
Flags: needinfo?(josh)
| Reporter | ||
Comment 8•11 years ago
|
||
Could you paste the output of `hg diff`?
| Reporter | ||
Comment 9•11 years ago
|
||
Oh, if you still have the null check present in type.py, that looks like it's now hiding the original error. I guess we should make it show a proper error instead :)
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
I attached the output of `hg diff`. Let me know what I can do :)
| Reporter | ||
Updated•10 years ago
|
Assignee: gioyik → nobody
| Assignee | ||
Comment 12•10 years ago
|
||
Hey I'm working on it
| Reporter | ||
Updated•10 years ago
|
Assignee: nobody → mprsai.bugs
| Reporter | ||
Comment 13•10 years ago
|
||
This appears to have been resolved since I filed it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•