Bug 866134 - GC: Address reported TokenStream::Position rooting hazards r=sfink

This commit is contained in:
Jon Coppeard
2013-04-26 18:50:18 +01:00
parent a726d15847
commit b203553f44
7 changed files with 34 additions and 13 deletions

View File

@@ -365,7 +365,7 @@ frontend::CompileFunctionBody(JSContext *cx, MutableHandleFunction fun, CompileO
// If the context is strict, immediately parse the body in strict
// mode. Otherwise, we parse it normally. If we see a "use strict"
// directive, we backup and reparse it as strict.
TokenStream::Position start;
TokenStream::Position start(parser.keepAtoms);
parser.tokenStream.tell(&start);
bool initiallyStrict = StrictModeFromContext(cx);
bool becameStrict;