зеркало из https://github.com/mozilla/gecko-dev.git
Need to modify string BEFORE caching iterators.
This commit is contained in:
Родитель
ad2ad1e77c
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче