Last Comment Bug 702507 - can we remove JSCLASS_CONSTRUCT_PROTOTYPE and JS_IsConstructing_PossiblyWithGivenThisObject?
: can we remove JSCLASS_CONSTRUCT_PROTOTYPE and JS_IsConstructing_PossiblyWithG...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla11
Assigned To: Luke Wagner [:luke]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-14 18:55 PST by Luke Wagner [:luke]
Modified: 2012-02-01 13:57 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
rm (6.54 KB, patch)
2011-11-17 09:01 PST, Luke Wagner [:luke]
jwalden+bmo: review+
Details | Diff | Review

Description Luke Wagner [:luke] 2011-11-14 18:55:30 PST
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.
Comment 1 Luke Wagner [:luke] 2011-11-14 18:57:41 PST
Also, thanks to bsdunx on irc for pointing this out.
Comment 2 Brendan Eich [:brendan] 2011-11-14 18:58:41 PST
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
Comment 3 Jeff Walden [:Waldo] (remove +bmo to email) 2011-11-14 19:02:03 PST
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 Jasper St. Pierre 2011-11-14 19:03:56 PST
Yes, see https://bugzilla.gnome.org/show_bug.cgi?id=663441
Comment 5 Luke Wagner [:luke] 2011-11-17 09:01:07 PST
Created attachment 575208 [details] [diff] [review]
rm

No objections on the newsgroup.
Comment 7 Ed Morley [:emorley] 2011-11-18 03:24:32 PST
https://hg.mozilla.org/mozilla-central/rev/a7b658e309b9
Comment 8 Jeff Walden [:Waldo] (remove +bmo to email) 2011-11-30 05:53:52 PST
Luke, https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_IsConstructing_PossiblyWithGivenThisObject could use axing.
Comment 9 Luke Wagner [:luke] 2011-11-30 09:28:30 PST
Marked obsolete.

Note You need to log in before you can comment on or make changes to this bug.