Title: [145567] trunk/Source/WebCore
- Revision
- 145567
- Author
- commit-qu...@webkit.org
- Date
- 2013-03-12 11:20:02 -0700 (Tue, 12 Mar 2013)
Log Message
Unreviewed, rolling out r145277.
http://trac.webkit.org/changeset/145277
https://bugs.webkit.org/show_bug.cgi?id=112170
chromium-gpu and android testers are seeing failures/crashes
relating to this code (Requested by eseidel on #webkit).
Patch by Sheriff Bot <webkit.review....@gmail.com> on 2013-03-12
* html/parser/BackgroundHTMLInputStream.cpp:
(WebCore::BackgroundHTMLInputStream::rewindTo):
* html/parser/BackgroundHTMLInputStream.h:
(BackgroundHTMLInputStream):
(Checkpoint):
* html/parser/BackgroundHTMLParser.cpp:
* html/parser/BackgroundHTMLParser.h:
(BackgroundHTMLParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpPendingSpeculations):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (145566 => 145567)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 18:18:39 UTC (rev 145566)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 18:20:02 UTC (rev 145567)
@@ -1,3 +1,23 @@
+2013-03-12 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r145277.
+ http://trac.webkit.org/changeset/145277
+ https://bugs.webkit.org/show_bug.cgi?id=112170
+
+ chromium-gpu and android testers are seeing failures/crashes
+ relating to this code (Requested by eseidel on #webkit).
+
+ * html/parser/BackgroundHTMLInputStream.cpp:
+ (WebCore::BackgroundHTMLInputStream::rewindTo):
+ * html/parser/BackgroundHTMLInputStream.h:
+ (BackgroundHTMLInputStream):
+ (Checkpoint):
+ * html/parser/BackgroundHTMLParser.cpp:
+ * html/parser/BackgroundHTMLParser.h:
+ (BackgroundHTMLParser):
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
+
2013-03-12 Simon Fraser <simon.fra...@apple.com>
Keep track of the number of GraphicsLayers with tiled backing in RenderLayerCompositor
Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLInputStream.cpp (145566 => 145567)
--- trunk/Source/WebCore/html/parser/BackgroundHTMLInputStream.cpp 2013-03-12 18:18:39 UTC (rev 145566)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLInputStream.cpp 2013-03-12 18:20:02 UTC (rev 145567)
@@ -32,8 +32,6 @@
namespace WebCore {
BackgroundHTMLInputStream::BackgroundHTMLInputStream()
- : m_firstValidCheckpointIndex(0)
- , m_firstValidSegmentIndex(0)
{
}
@@ -55,35 +53,17 @@
return checkpoint;
}
-void BackgroundHTMLInputStream::invalidateCheckpointsUpThrough(HTMLInputCheckpoint checkpointIndex)
-{
- ASSERT(checkpointIndex < m_checkpoints.size());
- ASSERT(checkpointIndex >= m_firstValidCheckpointIndex);
- const Checkpoint& checkpoint = m_checkpoints[checkpointIndex];
- ASSERT(m_firstValidSegmentIndex <= checkpoint.numberOfSegmentsAlreadyAppended);
- for (size_t i = m_firstValidSegmentIndex; i < checkpoint.numberOfSegmentsAlreadyAppended; ++i)
- m_segments[i] = String();
- m_firstValidSegmentIndex = checkpoint.numberOfSegmentsAlreadyAppended;
-
- for (size_t i = m_firstValidCheckpointIndex; i <= checkpointIndex; ++i)
- m_checkpoints[i].clear();
- m_firstValidCheckpointIndex = checkpointIndex + 1;
-}
-
void BackgroundHTMLInputStream::rewindTo(HTMLInputCheckpoint checkpointIndex, const String& unparsedInput)
{
ASSERT(checkpointIndex < m_checkpoints.size()); // If this ASSERT fires, checkpointIndex is invalid.
const Checkpoint& checkpoint = m_checkpoints[checkpointIndex];
- ASSERT(!checkpoint.isNull());
bool isClosed = m_current.isClosed();
m_current = checkpoint.input;
- for (size_t i = checkpoint.numberOfSegmentsAlreadyAppended; i < m_segments.size(); ++i) {
- ASSERT(!m_segments[i].isNull());
+ for (size_t i = checkpoint.numberOfSegmentsAlreadyAppended; i < m_segments.size(); ++i)
m_current.append(SegmentedString(m_segments[i]));
- }
if (!unparsedInput.isEmpty())
m_current.prepend(SegmentedString(unparsedInput));
@@ -95,8 +75,6 @@
m_segments.clear();
m_checkpoints.clear();
- m_firstValidCheckpointIndex = 0;
- m_firstValidSegmentIndex = 0;
}
}
Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLInputStream.h (145566 => 145567)
--- trunk/Source/WebCore/html/parser/BackgroundHTMLInputStream.h 2013-03-12 18:18:39 UTC (rev 145566)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLInputStream.h 2013-03-12 18:20:02 UTC (rev 145567)
@@ -50,7 +50,6 @@
// point all outstanding checkpoints are invalidated.
HTMLInputCheckpoint createCheckpoint();
void rewindTo(HTMLInputCheckpoint, const String& unparsedInput);
- void invalidateCheckpointsUpThrough(HTMLInputCheckpoint);
private:
struct Checkpoint {
@@ -58,20 +57,11 @@
SegmentedString input;
size_t numberOfSegmentsAlreadyAppended;
-
-#ifndef NDEBUG
- bool isNull() const { return input.isEmpty() && !numberOfSegmentsAlreadyAppended; }
-#endif
- void clear() { input.clear(); numberOfSegmentsAlreadyAppended = 0; }
};
SegmentedString m_current;
Vector<String> m_segments;
Vector<Checkpoint> m_checkpoints;
-
- // Note: These indicies may === vector.size(), in which case there are no valid checkpoints/segments at this time.
- size_t m_firstValidCheckpointIndex;
- size_t m_firstValidSegmentIndex;
};
}
Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp (145566 => 145567)
--- trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp 2013-03-12 18:18:39 UTC (rev 145566)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp 2013-03-12 18:20:02 UTC (rev 145567)
@@ -94,13 +94,6 @@
pumpTokenizer();
}
-void BackgroundHTMLParser::passedCheckpoint(HTMLInputCheckpoint inputCheckpoint)
-{
- // Note, we should not have to worry about the index being invalid
- // as messages from the main thread will be processed in FIFO order.
- m_input.invalidateCheckpointsUpThrough(inputCheckpoint);
-}
-
void BackgroundHTMLParser::finish()
{
markEndOfFile();
Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h (145566 => 145567)
--- trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h 2013-03-12 18:18:39 UTC (rev 145566)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h 2013-03-12 18:20:02 UTC (rev 145567)
@@ -75,7 +75,6 @@
void append(const String&);
void resumeFrom(PassOwnPtr<Checkpoint>);
- void passedCheckpoint(HTMLInputCheckpoint);
void finish();
void stop();
Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (145566 => 145567)
--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-03-12 18:18:39 UTC (rev 145566)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-03-12 18:20:02 UTC (rev 145567)
@@ -460,32 +460,19 @@
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), lineNumber().zeroBasedInt());
double startTime = currentTime();
- HTMLInputCheckpoint lastCheckpointPassed = 0;
while (!m_speculations.isEmpty()) {
- OwnPtr<ParsedChunk> chunk = m_speculations.takeFirst();
- lastCheckpointPassed = chunk->inputCheckpoint;
- processParsedChunkFromBackgroundParser(chunk.release());
+ processParsedChunkFromBackgroundParser(m_speculations.takeFirst());
- // Processing a chunk can call document.write, causing us to invalidate any remaining speculations.
- if (m_speculations.isEmpty() || isStopped()) {
- // We're aborting these speculations, so don't tell the parser we've passed a checkpoint (its already cleared its checkpoints).
- lastCheckpointPassed = 0;
+ if (isWaitingForScripts() || isStopped())
break;
- }
- if (isWaitingForScripts())
- break;
-
- if (currentTime() - startTime > parserTimeLimit) {
+ if (currentTime() - startTime > parserTimeLimit && !m_speculations.isEmpty()) {
m_parserScheduler->scheduleForResume();
break;
}
}
- if (lastCheckpointPassed)
- HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::passedCheckpoint, m_backgroundParser, lastCheckpointPassed));
-
InspectorInstrumentation::didWriteHTML(cookie, lineNumber().zeroBasedInt());
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes