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:
@@ -49,7 +49,7 @@ SetSourceMap(JSContext *cx, TokenStream &tokenStream, ScriptSource *ss, JSScript
|
||||
JSScript *
|
||||
frontend::CompileScript(JSContext *cx, HandleObject scopeChain, StackFrame *callerFrame,
|
||||
const CompileOptions &options,
|
||||
const jschar *chars, size_t length,
|
||||
StableCharPtr chars, size_t length,
|
||||
JSString *source_ /* = NULL */,
|
||||
unsigned staticLevel /* = 0 */)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, StackFrame *call
|
||||
// handler attribute in an HTML <INPUT> tag, or in a Function() constructor.
|
||||
bool
|
||||
frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun, CompileOptions options,
|
||||
const AutoNameVector &formals, const jschar *chars, size_t length)
|
||||
const AutoNameVector &formals, StableCharPtr chars, size_t length)
|
||||
{
|
||||
if (!CheckLength(cx, length))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user