mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Need to modify string BEFORE caching iterators.
This commit is contained in:
parent
ad2ad1e77c
commit
eb9d678d61
@ -35,11 +35,11 @@ namespace JS = JavaScript;
|
||||
JS::Reader::Reader(const String &source, const String &sourceLocation, uint32 initialLineNum):
|
||||
source(source), sourceLocation(sourceLocation), initialLineNum(initialLineNum)
|
||||
{
|
||||
Reader::source += char16(uni::null); // ensure last character is always '\0'
|
||||
const char16 *b = Reader::source.data();
|
||||
begin = b;
|
||||
p = b;
|
||||
end = b + Reader::source.size();
|
||||
Reader::source.append(uni::null); // ensure last character is always '\0'
|
||||
end = b + Reader::source.size() - 1;
|
||||
#ifdef DEBUG
|
||||
recordString = 0;
|
||||
#endif
|
||||
|
@ -35,11 +35,11 @@ namespace JS = JavaScript;
|
||||
JS::Reader::Reader(const String &source, const String &sourceLocation, uint32 initialLineNum):
|
||||
source(source), sourceLocation(sourceLocation), initialLineNum(initialLineNum)
|
||||
{
|
||||
Reader::source += char16(uni::null); // ensure last character is always '\0'
|
||||
const char16 *b = Reader::source.data();
|
||||
begin = b;
|
||||
p = b;
|
||||
end = b + Reader::source.size();
|
||||
Reader::source.append(uni::null); // ensure last character is always '\0'
|
||||
end = b + Reader::source.size() - 1;
|
||||
#ifdef DEBUG
|
||||
recordString = 0;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user