The default bug view has changed. See this FAQ.

can we remove JSCLASS_CONSTRUCT_PROTOTYPE and JS_IsConstructing_PossiblyWithGivenThisObject?

RESOLVED FIXED in mozilla11

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: luke, Assigned: luke)

Tracking

unspecified
mozilla11
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
The semantics of both JSCLASS_CONSTRUCT_PROTOTYPE and JS_IsConstructing_PossiblyWithGivenThisObject are quite confusing.  
The last remaining uses were removed (presumably by waldo's sanity-bringing InitClass changes) which of course means they became immediately, and flagrantly, broken.  Since I think these were mostly for internal use, can we remove 'em?  I'll ask on the newsgroup as well.
(Assignee)

Comment 1

5 years ago
Also, thanks to bsdunx on irc for pointing this out.
They were only for E4X, as grep discloses:

$ grep CONSTRUCT_PROTO *cpp
jsobj.cpp:        if (clasp->flags & JSCLASS_CONSTRUCT_PROTOTYPE) {
jsobj.cpp:     * JSCLASS_CONSTRUCT_PROTOTYPE flags, and the instance does not have its
jsobj.cpp:                            JSCLASS_CONSTRUCT_PROTOTYPE)) &&
jsxml.cpp:    JSCLASS_CONSTRUCT_PROTOTYPE |
jsxml.cpp:    JSCLASS_CONSTRUCT_PROTOTYPE |
jsxml.cpp:    JSCLASS_CONSTRUCT_PROTOTYPE |
jsxml.cpp:    JSCLASS_CONSTRUCT_PROTOTYPE |

Yank 'em, make sure ES4 tests pass.

/be
I understand that the GNOME people use J_C_P, although they're doing away with those uses.  There was discussion of this on IRC recently; CCing the person who was doing that (I think?).

Comment 4

5 years ago
Yes, see https://bugzilla.gnome.org/show_bug.cgi?id=663441
(Assignee)

Comment 5

5 years ago
Created attachment 575208 [details] [diff] [review]
rm

No objections on the newsgroup.
Attachment #575208 - Flags: review?(jwalden+bmo)
Attachment #575208 - Flags: review?(jwalden+bmo) → review+
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/a7b658e309b9
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/a7b658e309b9
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Luke, https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_IsConstructing_PossiblyWithGivenThisObject could use axing.
(Assignee)

Comment 9

5 years ago
Marked obsolete.
You need to log in before you can comment on or make changes to this bug.