Bug 41439

Summary: BogusCommentState should come in from the cold
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 41123, 41436    
Attachments:
Description Flags
Patch none

Description Adam Barth 2010-06-30 17:30:01 PDT
BogusCommentState should come in from the cold
Comment 1 Adam Barth 2010-06-30 17:33:14 PDT
Created attachment 60174 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-06-30 17:49:45 PDT
Comment on attachment 60174 [details]
Patch

LayoutTests/html5lib/webkit-resumer-expected.txt:159
 +  resources/webkit01.dat:
Geez, we still need to fix this output.

WebCore/html/HTMLTokenizer.cpp:1078
 +          else if (cc == InputStreamPreprocessor::endOfFileMarker)
I should have written these as isEndOfFileMarker(cc)

Why do we need ContinueBogusCommentState?  Why not just check m_token->type() == Comment?
Comment 3 Adam Barth 2010-06-30 19:18:53 PDT
> WebCore/html/HTMLTokenizer.cpp:1078
>  +          else if (cc == InputStreamPreprocessor::endOfFileMarker)
> I should have written these as isEndOfFileMarker(cc)

Oh, ok.  I just copied another state/

> Why do we need ContinueBogusCommentState?  Why not just check m_token->type() == Comment?

Because that would be an extra branch per character.
Comment 4 Eric Seidel (no email) 2010-06-30 22:09:28 PDT
(In reply to comment #3)
> > Why do we need ContinueBogusCommentState?  Why not just check m_token->type() == Comment?
> 
> Because that would be an extra branch per character.

Really?  I meant in the BogusCommentState itself.  Are we commonly in the BogusCommentState?  I agree this is fewer branches.
Comment 5 WebKit Commit Bot 2010-07-01 00:40:10 PDT
Comment on attachment 60174 [details]
Patch

Clearing flags on attachment: 60174

Committed r62233: <http://trac.webkit.org/changeset/62233>
Comment 6 WebKit Commit Bot 2010-07-01 00:40:14 PDT
All reviewed patches have been landed.  Closing bug.