Bug 39755

Summary: Make HTML5 lexer not ASSERT when resuming partial parses
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 39259    
Attachments:
Description Flags
Patch eric: review+

Description Adam Barth 2010-05-26 11:31:11 PDT
Make HTML5 lexer not ASSERT when resuming partial parses
Comment 1 Adam Barth 2010-05-26 11:43:23 PDT
Created attachment 57122 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-05-26 12:26:54 PDT
Comment on attachment 57122 [details]
Patch

This is an excellent test to have.  However, I'm confused by the output.  Are we running each script more than once?

 You should add a comment next to m_token as to why we need to hold it as a member.

isEndTagBufferingState is almost big enough to justify using a hash.  Unclear.

Ok, so I love the patch.  My big concern is the test.  Why is this forked from runner/webkit_runner.  Can we just add this functionality to one of those, or does this need to be a copy of the javascript forever?

r- for the above nits.
Comment 3 Adam Barth 2010-05-26 13:02:39 PDT
> This is an excellent test to have.  However, I'm confused by the output.  Are we running each script more than once?

Yes.  We run each test multiple times: once for each position where we could interrupt the parser.

>  You should add a comment next to m_token as to why we need to hold it as a member.

Ok.

> isEndTagBufferingState is almost big enough to justify using a hash.  Unclear.

A hash?  That seems like overkill for eight branches.

> Ok, so I love the patch.  My big concern is the test.  Why is this forked from runner/webkit_runner.  Can we just add this functionality to one of those, or does this need to be a copy of the javascript forever?

Well, once we get external scripts working, we can pull out all the common bits into external JavaScript files.  ;)
Comment 4 Eric Seidel (no email) 2010-05-26 13:32:57 PDT
Comment on attachment 57122 [details]
Patch

OK.  r+ with revision then. :)
Comment 5 Adam Barth 2010-05-26 14:51:12 PDT
Committed r60253: <http://trac.webkit.org/changeset/60253>