Closed Bug 856911 Opened 11 years ago Closed 11 years ago

Decide on a consistent representation for non-nullable JSObject in bindings code

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

Right now it's JSObject* for callback interface arguments and normal binding return values, but JSObject& for normal binding arguments.  This is making it kinda hard to do "object" in JS-implemented interfaces.

My temptation, honestly, would be to standardize on JSObject& for non-nullable, and make things work for return values by using NonNull cleverly.

Thoughts?
Sounds reasonable.  & enforces the non-nullness more heavily.

I don't know what you mean by "make things work for return values by using NonNull cleverly", though.
Oh, because return values, even non-null ones, are probably going to stay JSObject*, so we need the "wrapping" code to handle both that and JSObject&.  Though maybe we should just make non-null object values JSObject& as well and be done with it?
Depends on: 868715
Fixed by the patch in bug 868715; now it's all Handle<JSObject*> for arguments.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.