Remove assorted jsapi.h includes

RESOLVED FIXED in mozilla26

Status

()

Core
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla26
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(3 attachments)

Comment hidden (empty)
(Assignee)

Comment 1

4 years ago
Created attachment 799370 [details] [diff] [review]
(part 1) - Removed some jsapi.h includes in Gecko.
Attachment #799370 - Flags: review?(bzbarsky)
(Assignee)

Comment 2

4 years ago
Created attachment 799846 [details] [diff] [review]
(part 2) - Move JSID_{VOID,EMPTY}HANDLE from jsapi.{h,cpp} to Id.{h,cpp}.

I thought about doing this when I created Id.{h,cpp}, but deferred.  But now I
see that it will allow AccessCheck.h to not depend on jsapi.h.

I also moved them into the global namespace, because JS::JS_* is stoopid.
Attachment #799846 - Flags: review?(luke)

Updated

4 years ago
Attachment #799846 - Flags: review?(luke) → review+
(Assignee)

Comment 3

4 years ago
Created attachment 799879 [details] [diff] [review]
(part 3) - Remove lots of jsapi.h includes in SpiderMonkey.

After this, the only .h files within js/src/ that include jsapi.h are jsexn.h
and vm/String.h.  That's nice.
Attachment #799879 - Flags: review?(luke)
Comment on attachment 799370 [details] [diff] [review]
(part 1) - Removed some jsapi.h includes in Gecko.

r=me
Attachment #799370 - Flags: review?(bzbarsky) → review+

Comment 5

4 years ago
Comment on attachment 799879 [details] [diff] [review]
(part 3) - Remove lots of jsapi.h includes in SpiderMonkey.

ooc: does this mean all these .cpps (which no longer #include jsapi.h explicitly) don't include jsapi.h transitively at all?
Attachment #799879 - Flags: review?(luke) → review+
(Assignee)

Comment 6

4 years ago
> ooc: does this mean all these .cpps (which no longer #include jsapi.h
> explicitly) don't include jsapi.h transitively at all?

Alas, no.  jsapi.h is included by vm/String.h, which is included by vm/ObjectImpl.h, which is included by jsobj.h and vm/Shape.h, which are both included all over the place.  #include is truly a ridiculous mechanism.  But we're heading in the right direction :)
(Assignee)

Comment 7

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5414483004cf
https://hg.mozilla.org/integration/mozilla-inbound/rev/053f6a2c5e29
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1262e2db291

Comment 8

4 years ago
https://hg.mozilla.org/mozilla-central/rev/5414483004cf
https://hg.mozilla.org/mozilla-central/rev/053f6a2c5e29
https://hg.mozilla.org/mozilla-central/rev/c1262e2db291
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.