Index: Source/core/loader/DocumentWriter.cpp |
diff --git a/Source/core/loader/DocumentWriter.cpp b/Source/core/loader/DocumentWriter.cpp |
index 7230b91b51d550a74e0aeae63cc6087c6d251e9e..21b3f041c97cc0c7540cdf34deac5e7733b5070c 100644 |
--- a/Source/core/loader/DocumentWriter.cpp |
+++ b/Source/core/loader/DocumentWriter.cpp |
@@ -6,13 +6,13 @@ |
* are met: |
* |
* 1. Redistributions of source code must retain the above copyright |
- * notice, this list of conditions and the following disclaimer. |
+ * notice, this list of conditions and the following disclaimer. |
* 2. Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
- * documentation and/or other materials provided with the distribution. |
+ * documentation and/or other materials provided with the distribution. |
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
* its contributors may be used to endorse or promote products derived |
- * from this software without specific prior written permission. |
+ * from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
@@ -81,6 +81,9 @@ void DocumentWriter::appendReplacingData(const String& source) |
// Because we're pinned to the main thread we don't need to worry about |
// passing ownership of the source string. |
parser->append(source.impl()); |
+ // NOTE: Even though we're pinned to the main thread, script execution |
+ // may still cause the parser to yield. We may not be done parsing |
+ // the new source yet! |
} |
} |
@@ -111,7 +114,7 @@ void DocumentWriter::end() |
ASSERT(m_document); |
// http://bugs.webkit.org/show_bug.cgi?id=10854 |
- // The frame's last ref may be removed and it can be deleted by checkCompleted(), |
+ // The frame's last ref may be removed and it can be deleted by checkCompleted(), |
// so we'll add a protective refcount |
RefPtr<Frame> protector(m_document->frame()); |