Closed
Bug 856215
Opened 12 years ago
Closed 12 years ago
Codegen for converting a sequence of sequences is buggy
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
7.88 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
We end up with something like this:
for (uint32_t i = 0; i < length; ++i) {
...
for (uint32_t i = 0; i < length; ++i) {
...
if (!xpc::NonVoidStringToJsval(cx, currentValue[i][i], &tmp)) {
which is obviously not a good idea.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Hrm. So the problem is that we don't actually know the type of currentValue[i] when we're generating this code, so we can't easily create a temporary for it. :(
I need to think about this a tad....
![]() |
Assignee | |
Comment 2•12 years ago
|
||
So this is a bit annoying.
I can hack this together, sort of, but it fails any time the declType of a method return value and dictionary member type are different, which they are for dictionary types for example.
If we had C++11 decltype(), I could just decltype(currentValue)::elem_type. But we don't have that on all our supported platforms yet.
Maybe I need to special-case sequence-of-sequences conversion to call a function of some sort.
Or maybe I need to keep a global nesting level and name my counter variables with that level included.... That last might be simplest. :(
![]() |
Assignee | |
Comment 3•12 years ago
|
||
This is ugly, but seems to work....
Attachment #731424 -
Flags: review?(khuey)
![]() |
Assignee | |
Comment 4•12 years ago
|
||
Valentin, does that patch help bug 843865?
Flags: needinfo?(valentin.gosu)
Comment 5•12 years ago
|
||
It seems to be working perfectly now. Thanks!
Flags: needinfo?(valentin.gosu)
Attachment #731424 -
Flags: review?(khuey) → review+
![]() |
Assignee | |
Comment 6•12 years ago
|
||
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla23
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•