Bug 39755 - Make HTML5 lexer not ASSERT when resuming partial parses
Summary: Make HTML5 lexer not ASSERT when resuming partial parses
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 39259
  Show dependency treegraph
 
Reported: 2010-05-26 11:31 PDT by Adam Barth
Modified: 2010-05-26 14:51 PDT (History)
1 user (show)

See Also:


Attachments
Patch (38.85 KB, patch)
2010-05-26 11:43 PDT, Adam Barth
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>