Changeset 140867 in webkit


Ignore:
Timestamp:
Jan 25, 2013 2:35:29 PM (11 years ago)
Author:
tonyg@chromium.org
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140863 r140867  
     12013-01-25  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Fix an ASSERT in BackgroundHTMLParser::appendPartial
     4        https://bugs.webkit.org/show_bug.cgi?id=107983
     5
     6        Reviewed by Eric Seidel.
     7
     8        The complier may create a temporary for the isolatedCopy of the source string. This could cause the refCount of the
     9        StringImpl to be greater than one when appendPartial is invoked on the background thread.
     10        This patch ensures the temporary is gone by that time which fixes the ASSERT in numerous layout tests.
     11
     12        No new tests because covered by existing tests.
     13
     14        * html/parser/HTMLDocumentParser.cpp:
     15        (WebCore::HTMLDocumentParser::append):
     16
    1172013-01-25  Dean Jackson  <dino@apple.com>
    218
  • trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp

    r140842 r140867  
    499499
    500500        ParserIdentifier identifier = ParserMap::identifierForParser(this);
    501         HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::appendPartial, identifier, source.toString().isolatedCopy()));
     501        const Closure& appendPartial = bind(&BackgroundHTMLParser::appendPartial, identifier, source.toString().isolatedCopy());
     502        HTMLParserThread::shared()->postTask(appendPartial);
    502503        return;
    503504    }
Note: See TracChangeset for help on using the changeset viewer.