Closed Bug 916993 Opened 11 years ago Closed 11 years ago

GC: Handlify public string methods

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

      No description provided.
I had to add a bunch of new Rooted in paths that look like they may be hot in order to support a JS_InternJSString that takes a Handle. All but one use was in a tail position, and thus did not need to be rooted here.
Attachment #805743 - Flags: feedback?(bzbarsky)
Comment on attachment 805743 [details] [diff] [review]
handlify_string_apis-wip0.diff

Looks fine to me.  None of these are that hot; worker events are the closest, but still not that hot.
Attachment #805743 - Flags: feedback?(bzbarsky) → feedback+
Comment on attachment 805743 [details] [diff] [review]
handlify_string_apis-wip0.diff

r=me on the non-jsapi.h bits.  That part could use a JS peer, though seems fine to me.
Attachment #805743 - Flags: review+
Comment on attachment 805743 [details] [diff] [review]
handlify_string_apis-wip0.diff

Thanks, Boris!
Attachment #805743 - Flags: review?(jcoppeard)
Comment on attachment 805743 [details] [diff] [review]
handlify_string_apis-wip0.diff

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

Looks good, but did we decide to use the JS::HandleValue style rather than JS::Hande<JS::Value> in in jsapi.h now?
Attachment #805743 - Flags: review?(jcoppeard) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/1ef7f6e82c16


(In reply to Jon Coppeard (:jonco) from comment #6)
> Comment on attachment 805743 [details] [diff] [review]
> handlify_string_apis-wip0.diff
> 
> Review of attachment 805743 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Looks good, but did we decide to use the JS::HandleValue style rather than
> JS::Hande<JS::Value> in in jsapi.h now?

Yes, there was a long thread on [JS-internals] titled "What's in a (handle's) name?". I consider Luke's arguments in [1] to have overwhelmingly "won" the discussion in the favor of typedefs.

1 - http://www.mail-archive.com/dev-tech-js-engine-internals@lists.mozilla.org/msg00415.html
Whiteboard: [leave open
After discussion on IRC last night, we have decided to handlify all the things, even methods which do not necessarily GC. I'm going to upload a second patch which handles the rest of the string methods (except for JS_GetStringLength, which Tom is working on).
Keywords: dev-doc-needed
What is the status here?
I think we got everything that can GC. I don't think we want to force rooting for things that cannot GC.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [leave open
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: