Closed Bug 1040316 Opened 10 years ago Closed 6 years ago

Move AutoStableStringChars out of jsfriendapi

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bzbarsky, Assigned: Waldo)

Details

Attachments

(1 file)

I moved it there for bug 966452.
FWIW, I wouldn't mind making AutoStableStringChars part of the API. When I added it I expected us to use it in Gecko at some point.
Attached patch PatchSplinter Review
I agree that this concept is probably reasonably just made public/stable and put into the better-curated js/public.

I didn't attempt to minimize #includes by any code using AutoStableStringChars now.  Possibly this is something Gecko peoples could do once they know this exists, or else (my current plan) we should do this when we eventually eliminate jsapi.h and jsfriendapi.h entirely in favor of smaller headers for distinct concepts.  Important thing is, I mostly doubt it's worth my time to try to minimize *now*.  :-\
Attachment #9002144 - Flags: review?(jdemooij)
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Couple other comments.

I didn't put "auto" in the header name 'cause it's mostly noise, and StableStringChars.h isn't a misleading name.

The shadow:: dependency is sad-ish.  I would like to have something like js/public/detail/String.h that includes the shadow structures not in JS::shadow but in the detail namespace, and js/public/shadow/String.h that encapsulates detail/String.h accesses in a public API.  Then to access shadow stuff you have to *affirmatively* #include it, while public headers could still use the internal stuff without also exposing it to embedders.  (This is like the <bits/*.h> thing in libc: don't expose stuff unless demanded, but allow it to be used in other libc headers.)  But this is quite afield of this patch, so not here.
Comment on attachment 9002144 [details] [diff] [review]
Patch

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

Nice.
Attachment #9002144 - Flags: review?(jdemooij) → review+
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d10eda7f12d
Move AutoStableStringChars out of friendapi into public API.  r=jandem
https://hg.mozilla.org/mozilla-central/rev/6d10eda7f12d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: