Closed Bug 679879 Opened 8 years ago Closed 8 years ago

Change JSFunction macros to methods

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

(Whiteboard: [inbound])

Attachments

(2 files)

No description provided.
Assignee: general → jorendorff
Attachment #553905 - Flags: review?(jwalden+bmo)
Use JS_GetPrivate rather than GET_FUNCTION_PRIVATE in caps.
Attachment #553934 - Flags: review?(mrbkap)
Attachment #553905 - Attachment description: v1 → part 2, js/src - v1
Attachment #553934 - Flags: review?(mrbkap) → review+
Comment on attachment 553905 [details] [diff] [review]
part 2, js/src - v1

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

::: js/src/jsapi.cpp
@@ +4355,5 @@
>               * As jsapi.h notes, fs must point to storage that lives as long
>               * as fun->object lives.
>               */
>              Value priv = PrivateValue(fs);
> +            if (!js_SetReservedSlot(cx, fun, 0, priv))

You could make this fun->setReservedSlot(0, priv) now, right?

::: js/src/jsfun.h
@@ +229,5 @@
>      static const uint32 CLASS_RESERVED_SLOTS = JSObject::FUN_CLASS_RESERVED_SLOTS;
> +
> +
> +    js::Class *getConstructorClass() const {
> +        JS_ASSERT(!isInterpreted());

isNative() seems more to the point here, to me.

@@ +234,5 @@
> +        return u.n.clasp;
> +    }
> +
> +    void setConstructorClass(js::Class *clasp) {
> +        JS_ASSERT(!isInterpreted());

And here.

@@ +239,5 @@
> +        u.n.clasp = clasp;
> +    }
> +
> +    JSNativeTraceInfo *getTraceInfo() {
> +        JS_ASSERT(!isInterpreted());

And here.
Attachment #553905 - Flags: review?(jwalden+bmo) → review+
http://hg.mozilla.org/mozilla-central/rev/a5c778f36c33
http://hg.mozilla.org/mozilla-central/rev/1dccbc1234f4
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Depends on: 680755
Duplicate of this bug: 513014
You need to log in before you can comment on or make changes to this bug.