Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
Created attachment 183299 [details] Patch
Comment on attachment 183299 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183299&action=review > Source/WebCore/html/parser/BackgroundHTMLParser.cpp:88 > +void BackgroundHTMLParser::stop() > +{ > + delete this; > +} Shouldn't it clear itself from its weak ptr factry?
That happens automatically. The only reason we do it manually in HTMLDocumentParser is because we want to cancel all incoming messages before being destroyed.
Comment on attachment 183299 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183299&action=review > Source/WebCore/html/parser/BackgroundHTMLParser.h:45 > + struct Config { You mentioned this isn't needed, maybe we should add a FIXME.
I can break this patch into smaller pieces if that would be helpful. Using WeakPtrs just for the background -> foreground communication would be a much smaller patch.
That would help me, yes.
Created attachment 187339 [details] Patch
Comment on attachment 187339 [details] Patch This is so much better. Thank you.
Comment on attachment 187339 [details] Patch Clearing flags on attachment: 187339 Committed r142305: <http://trac.webkit.org/changeset/142305>
All reviewed patches have been landed. Closing bug.