Commit 0cc4b93b authored by Nate Chapin's avatar Nate Chapin Committed by Commit Bot

Don't end() if XMLDocumentParser::ResumeParsing() triggers a detach

Bug: 977520
Test: http/tests/navigation/xmhtml-location-change-crash.xhtml
Change-Id: Idbb8718db7de77ddf41dbc62bd102e884d0bfa12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1674364
Commit-Queue: Nate Chapin <japhet@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671872}
parent 39f15812
......@@ -1619,6 +1619,9 @@ void XMLDocumentParser::ResumeParsing() {
// the passed string has more than one reference.
Append(rest.ToString().Impl());
if (IsDetached())
return;
// Finally, if finish() has been called and write() didn't result
// in any further callbacks being queued, call end()
if (finish_called_ && pending_callbacks_.IsEmpty())
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="../resources/dummy.js"/>
</head>
<body>
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
window.location = "resources/pass-and-notify-done.html";
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment