Closed
Bug 1071292
Opened 10 years ago
Closed 5 years ago
webidl code generation failing
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 1515319
People
(Reporter: fabrice, Unassigned)
Details
Attachments
(2 files)
Not sure how to describe the error more precisely... Here's a patch that exhibits the issue. We fail with:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/fabrice/dev/b2g-inbound/python/mozbuild/mozbuild/action/webidl.py", line 17, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/fabrice/dev/b2g-inbound/python/mozbuild/mozbuild/action/webidl.py", line 13, in main
manager.generate_build_files()
File "/home/fabrice/dev/b2g-inbound/dom/bindings/mozwebidlcodegen/__init__.py", line 266, in generate_build_files
written, deps = self._generate_build_files_for_webidl(filename)
File "/home/fabrice/dev/b2g-inbound/dom/bindings/mozwebidlcodegen/__init__.py", line 467, in _generate_build_files_for_webidl
root = CGBindingRoot(self._config, binding_stem, filename)
File "/home/fabrice/dev/b2g-inbound/dom/bindings/Codegen.py", line 12147, in __init__
lambda d: d.identifier.name)])
File "/home/fabrice/dev/b2g-inbound/dom/bindings/Codegen.py", line 11216, in __init__
self.structs = self.getStructs()
File "/home/fabrice/dev/b2g-inbound/dom/bindings/Codegen.py", line 11457, in getStructs
methods.append(self.traceDictionaryMethod())
File "/home/fabrice/dev/b2g-inbound/dom/bindings/Codegen.py", line 11381, in traceDictionaryMethod
if typeNeedsRooting(m.type)]
File "/home/fabrice/dev/b2g-inbound/dom/bindings/Codegen.py", line 11682, in getMemberTrace
assert False
AssertionError
Comment 1•10 years ago
|
||
This is happening because we don't support having a MozMap whose values need tracing as a dictionary member yet.
In this case the values are ActivityDecl, which needs tracing because of the "any" member.
Fixing this is a bit of work. Just doing codegen in the getMemberTrace implementation is easy, but then we run into the issue that MozMap values must have move or copy constructors and dictionaries with an "any" or "object" inside don't have those right now. I didn't want to give them copy constructors because those would be serious footguns, but a move constructor might be ok. It would take some work to make sure we got it completely correct, though.
Fabrice, how urgent is this problem? How hard a requirement is using "any" there?
Comment 2•10 years ago
|
||
Simple patch, which produces C++ that doesn't compile
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #1)
> Fabrice, how urgent is this problem? How hard a requirement is using "any"
> there?
Thanks for investigating Boris. I'll give it a try at not using "any" here and will comment back in this bug.
Comment 4•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Comment 5•5 years ago
|
||
This got fixed in bug 1515319. And IDL record has a move constructor, so everything works now.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•