Closed Bug 792137 Opened 12 years ago Closed 12 years ago

Update [TreatNonCallableAsNull] to spec

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

It's specified on the callback, not the attribute.
Whiteboard: [need review]
Attachment #662266 - Flags: review?(khuey)
Comment on attachment 662266 [details] [diff] [review]
[TreatNonCallableAsNull] lives on the callback type now.

Review of attachment 662266 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bindings/Codegen.py
@@ +2335,5 @@
> +            template = (
> +                "if (%s) {\n"
> +                "  ${declName} = &${val}.toObject();\n"
> +                "} else {\n"
> +                "  ${declName} = NULL;\n"

nullptr

@@ +2345,5 @@
> +                "} else {\n"
> +                "%s"
> +                "}" % CGIndenter(onFailureNotCallable(failureCode)).define(),
> +                isDefinitelyObject, type,
> +                "${declName} = NULL",

nullptr

@@ +3785,5 @@
>  
>      if type.isCallback():
> +        if type.nullable():
> +            return CGGeneric("JSObject*")
> +        return CGGeneric("NonNull<JSObject>")

Shouldn't this do the same thing as object (ie JSObject&)?
Attachment #662266 - Flags: review?(peterv) → review+
Comment on attachment 662266 [details] [diff] [review]
[TreatNonCallableAsNull] lives on the callback type now.

> Shouldn't this do the same thing as object (ie JSObject&)?

Ah, this is the accessor signature.  Yes, it should.  Good catch.
Attachment #662266 - Flags: review?(khuey)
https://hg.mozilla.org/integration/mozilla-inbound/rev/c24f40ee97cb
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla19
https://hg.mozilla.org/mozilla-central/rev/c24f40ee97cb
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 742186
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.