Bug 696651 part 2 - Establish document.write() insertion position before re-entrant calls can occur. r=Olli.Pettay.

This commit is contained in:
Henri Sivonen
2011-10-29 23:14:31 +03:00
parent 102b8b2046
commit 05e8462674
5 changed files with 138 additions and 56 deletions

View File

@@ -53,3 +53,17 @@ nsHtml5UTF16Buffer::DeleteBuffer()
{
delete[] buffer;
}
void
nsHtml5UTF16Buffer::Swap(nsHtml5UTF16Buffer* aOther)
{
PRUnichar* tempBuffer = buffer;
PRInt32 tempStart = start;
PRInt32 tempEnd = end;
buffer = aOther->buffer;
start = aOther->start;
end = aOther->end;
aOther->buffer = tempBuffer;
aOther->start = tempStart;
aOther->end = tempEnd;
}