RESOLVED FIXED 110276
Fix crash in preloading scanning base tags with no href attribute for background parser
https://bugs.webkit.org/show_bug.cgi?id=110276
Summary Fix crash in preloading scanning base tags with no href attribute for backgro...
Tony Gentilcore
Reported 2013-02-19 16:02:10 PST
Fix crash in preloading scanning base tags with no href attribute for background parser
Attachments
Patch (13.93 KB, patch)
2013-02-19 16:06 PST, Tony Gentilcore
no flags
Tony Gentilcore
Comment 1 2013-02-19 16:06:42 PST
Eric Seidel (no email)
Comment 2 2013-02-19 16:12:01 PST
Comment on attachment 189193 [details] Patch I was afraid of this. I think this is a good change, but I don't really like how we're tying HTMLToken and CompactToken to the same API via the PreloadScanner template. :(
Adam Barth
Comment 3 2013-02-19 16:12:39 PST
Comment on attachment 189193 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189193&action=review > Source/WebCore/html/parser/CompactHTMLToken.h:86 > + Vector<Attribute> m_attributes; Attribute contains AtomicString and QualifiedName, which means it's not save to move between threads.
Adam Barth
Comment 4 2013-02-19 16:13:02 PST
s/save/safe/
Tony Gentilcore
Comment 5 2013-02-19 16:16:58 PST
Comment on attachment 189193 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189193&action=review >> Source/WebCore/html/parser/CompactHTMLToken.h:86 >> + Vector<Attribute> m_attributes; > > Attribute contains AtomicString and QualifiedName, which means it's not save to move between threads. This is CompactHTMLToken::Attribute which contains only Strings. I can change all occurrences of Attribute to CompactHTMLToken::Attribute to be more explicit to make it more readable.
Tony Gentilcore
Comment 6 2013-02-19 16:18:40 PST
(In reply to comment #2) > (From update of attachment 189193 [details]) > I was afraid of this. I think this is a good change, but I don't really like how we're tying HTMLToken and CompactToken to the same API via the PreloadScanner template. :( Would you prefer I undo it? I thought it was worth having the same API in order to avoid the code duplication. It's also possible a more similar API enhances readability.
Eric Seidel (no email)
Comment 7 2013-02-19 16:29:11 PST
(In reply to comment #6) > (In reply to comment #2) > > (From update of attachment 189193 [details] [details]) > > I was afraid of this. I think this is a good change, but I don't really like how we're tying HTMLToken and CompactToken to the same API via the PreloadScanner template. :( > > Would you prefer I undo it? I thought it was worth having the same API in order to avoid the code duplication. It's also possible a more similar API enhances readability. No, this is the right change. I just don't like the idea that we're limited to HTMLToken's API in CompactToken::Attribute. But when we run up against those limits, then we can re-visit.
Adam Barth
Comment 8 2013-02-19 16:35:34 PST
Ah! Ignore me. :)
Tony Gentilcore
Comment 9 2013-02-19 16:37:39 PST
(In reply to comment #8) > Ah! Ignore me. :) Do you want to review now?
Eric Seidel (no email)
Comment 10 2013-02-19 16:42:02 PST
Comment on attachment 189193 [details] Patch By the power of justice.
WebKit Review Bot
Comment 11 2013-02-19 17:22:30 PST
Comment on attachment 189193 [details] Patch Clearing flags on attachment: 189193 Committed r143415: <http://trac.webkit.org/changeset/143415>
WebKit Review Bot
Comment 12 2013-02-19 17:22:34 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.