Bug 798624 - Specialize low-level character access to JSStableString; r=luke, rs=Waldo

Implements JSStableString::chars() and pushes StableCharPtr into the interface
at several key choke-points. This will solidly enforce the requirement that we
have uninlined jschar*s in places that we may GC with a jschar* on the stack.
This commit is contained in:
Terrence Cole
2012-10-08 15:04:36 -07:00
parent c28931850c
commit 4ef37c98f5
34 changed files with 154 additions and 129 deletions

View File

@@ -312,7 +312,7 @@ js::AtomizeString(JSContext *cx, JSString *str, InternBehavior ib)
if (!stable)
return NULL;
const jschar *chars = stable->chars();
const jschar *chars = stable->chars().get();
size_t length = stable->length();
JS_ASSERT(length <= JSString::MAX_LENGTH);
return AtomizeInline(cx, &chars, length, ib);