Closed Bug 378982 Opened 18 years ago Closed 18 years ago

Parser doesn't handle Terminate() called multiple times well

Categories

(Core :: DOM: HTML Parser, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: mrbkap)

Details

Attachments

(2 files)

See discussion in bug 375051. In particular, we end up calling DidBuildModel on the sink multiple times, which I think breaks the contract...
Flags: blocking1.9?
Can't really determine if this is blocking or not based on current info. Blake, bz, please renominate and explain why if you think this should be a blocker.
Flags: blocking1.9? → blocking1.9-
As long as all sink impls (including 3rd party ones) that we expect to be used with 1.9 deal, I guess it's not a blocker...
Attached patch Potential fixSplinter Review
I haven't even compiled this, but it seems like this might fix this bug. I'm not sure if the "warning" is correct, but it seems bogus to ask the parser to terminate two times.
Attachment #265331 - Flags: superreview?(bzbarsky)
Attachment #265331 - Flags: review?(bzbarsky)
Comment on attachment 265331 [details] [diff] [review] Potential fix Please leave the warning only if there's a way to ask the parser whether it's already been terminated. Otherwise callers have no way to avoid calling it twice. If it _is_ possible to tell, we should make nsDocument do it (followup bug).
Attachment #265331 - Flags: superreview?(bzbarsky)
Attachment #265331 - Flags: superreview+
Attachment #265331 - Flags: review?(bzbarsky)
Attachment #265331 - Flags: review+
Fix checked into trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I don't think it's worth adding a method to see if Terminate has been called. I do wonder if it's worth making IsComplete serve that purpose, though.
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: