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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user