Closed Bug 949264 Opened 12 years ago Closed 12 years ago

Allow using union members in codegenerated events

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29
blocking-b2g 1.3+
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed
firefox29 --- fixed
b2g-v1.3 --- fixed
b2g-v1.4 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Andrea needs it, and anyway it's good to have it working.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Blocks: 949271
Comment on attachment 8346270 [details] [diff] [review] part 1. Share more codegen between events and CGNativeMember. But please file a bug to make codegen to use sane coding style for params. (aFoo, not foo)
Attachment #8346270 - Flags: review?(bugs) → review+
Attachment #8346584 - Flags: review?(bugs) → review+
Comment on attachment 8346273 [details] [diff] [review] part 2. Support union members in generated events. > if nullable: > dictType = CGTemplatedType("Nullable", dictType) > args.append(Argument("%s&" % dictType.define(), "retval")) >+ elif returnType.isUnion(): >+ args.append(Argument("%s&" % >+ CGUnionStruct.unionTypeDecl(returnType, True), >+ "retval")) aRetVal >+ if type.isUnion(): >+ return "retval = " + memberName + ";" And then change this too. >+ elif typeNeedsRooting(m.type): >+ raise TypeError("Need to implement tracing for event " >+ "member of type %s" % m.type) OK, this can be done later if needed.
Attachment #8346273 - Flags: review?(bugs) → review+
> aRetVal That's done in part 3. > OK, this can be done later if needed. Indeed. I just wanted the codegen to scream and die if the case ever comes up, rather than silently not tracing.
Blocks: 946316
Hi This bug blocks a blocker for v1.3 (Bug 946316). Because of this, nominating this bug for v1.3. Thanks!
blocking-b2g: --- → 1.3?
blocking-b2g: 1.3? → 1.3+
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: