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 72338c0f22
commit 54e53b84a8
36 changed files with 161 additions and 134 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);