Title: [140867] trunk/Source/WebCore
Revision
140867
Author
to...@chromium.org
Date
2013-01-25 14:35:29 -0800 (Fri, 25 Jan 2013)

Log Message

Fix an ASSERT in BackgroundHTMLParser::appendPartial
https://bugs.webkit.org/show_bug.cgi?id=107983

Reviewed by Eric Seidel.

The complier may create a temporary for the isolatedCopy of the source string. This could cause the refCount of the
StringImpl to be greater than one when appendPartial is invoked on the background thread.
This patch ensures the temporary is gone by that time which fixes the ASSERT in numerous layout tests.

No new tests because covered by existing tests.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::append):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140866 => 140867)


--- trunk/Source/WebCore/ChangeLog	2013-01-25 22:28:43 UTC (rev 140866)
+++ trunk/Source/WebCore/ChangeLog	2013-01-25 22:35:29 UTC (rev 140867)
@@ -1,3 +1,19 @@
+2013-01-25  Tony Gentilcore  <to...@chromium.org>
+
+        Fix an ASSERT in BackgroundHTMLParser::appendPartial
+        https://bugs.webkit.org/show_bug.cgi?id=107983
+
+        Reviewed by Eric Seidel.
+
+        The complier may create a temporary for the isolatedCopy of the source string. This could cause the refCount of the
+        StringImpl to be greater than one when appendPartial is invoked on the background thread.
+        This patch ensures the temporary is gone by that time which fixes the ASSERT in numerous layout tests.
+
+        No new tests because covered by existing tests.
+
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::append):
+
 2013-01-25  Dean Jackson  <d...@apple.com>
 
         Add a user agent stylesheet for plugins

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (140866 => 140867)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-01-25 22:28:43 UTC (rev 140866)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2013-01-25 22:35:29 UTC (rev 140867)
@@ -498,7 +498,8 @@
             startBackgroundParser();
 
         ParserIdentifier identifier = ParserMap::identifierForParser(this);
-        HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::appendPartial, identifier, source.toString().isolatedCopy()));
+        const Closure& appendPartial = bind(&BackgroundHTMLParser::appendPartial, identifier, source.toString().isolatedCopy());
+        HTMLParserThread::shared()->postTask(appendPartial);
         return;
     }
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to