Closed Bug 498488 Opened 11 years ago Closed 10 years ago

Change JSObject macros to methods

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

No description provided.
Attached patch v1Splinter Review
This is a nice start, and I think worth landing on its own.

Going much further requires figuring out what to do about STOBJ macros, which I don't want to think about at the moment.

TODO: The accessors for delegate, proto, parent, and class; scope and shape. The js_*Slots functions should also be methods.
Assignee: general → jorendorff
Attachment #391053 - Flags: review?(jwalden+bmo)
Comment on attachment 391053 [details] [diff] [review]
v1

>@@ -3676,18 +3670,18 @@ js_DefineNativeProperty(JSContext *cx, J
>                                            (attrs & JSPROP_SETTER)
>                                            ? setter
>                                            : sprop->setter);
> 
>             /* NB: obj == pobj, so we can share unlock code at the bottom. */
>             if (!sprop)
>                 goto error;
>         } else if (prop) {
>-            /* NB: call OBJ_DROP_PROPERTY, as pobj might not be native. */
>-            OBJ_DROP_PROPERTY(cx, pobj, prop);
>+            /* NB: call obj->dropProperty, as pobj might not be native. */
>+            pobj->dropProperty(cx, prop);

This comment looks like a lie at first; should rather be JSObject::dropProperty methinks.  This nit is arguably pervasive, but please change here at the very least.

Hoping we can get this in ASAP rather than have it get punted to next release cycle...
Attachment #391053 - Flags: review?(jwalden+bmo) → review+
http://hg.mozilla.org/tracemonkey/rev/7bbba24ea2ad
Flags: wanted1.9.2?
Whiteboard: fixed-in-tracemonkey
I didn't mean to flip that wanted? bit.
Flags: wanted1.9.2?
http://hg.mozilla.org/mozilla-central/rev/7bbba24ea2ad
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.