Last Comment Bug 717180 - Re-fix bug 98654 (Make document.write after window.location not blow away the document)
: Re-fix bug 98654 (Make document.write after window.location not blow away the...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Henri Sivonen (:hsivonen)
:
Mentors:
http://bnc.ca/
: 738614 (view as bug list)
Depends on:
Blocks: 738614
  Show dependency treegraph
 
Reported: 2012-01-11 00:25 PST by Henri Sivonen (:hsivonen)
Modified: 2012-06-06 07:33 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
unaffected
+
verified
+
verified
+
verified


Attachments
Add a flag to nsDocument for tracking the situation where we've nulled out mParser due to termination but HTML says we should have an aborted active parser whose insertion point is defined (5.55 KB, patch)
2012-03-27 05:43 PDT, Henri Sivonen (:hsivonen)
no flags Details | Diff | Review
Add a flag to nsDocument for tracking the situation where we've nulled out mParser due to termination but HTML says we should have an aborted active parser whose insertion point is defined, v2 (5.65 KB, patch)
2012-03-27 05:56 PDT, Henri Sivonen (:hsivonen)
bugs: review+
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
Details | Diff | Review

Description Henri Sivonen (:hsivonen) 2012-01-11 00:25:03 PST
Bug 98654 has regressed somewhere along the way. Other browsers don't have the same bug, so we should probably re-fix the bug.

See http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-January/034293.html
Comment 1 Henri Sivonen (:hsivonen) 2012-01-13 04:18:32 PST
Potential approach to fixing: Add an "ignore document.open and .write" flag to the document. Set that flag when the document's parser is forcibly terminated (i.e. the parser doesn't end parsing naturally by reaching EOF).
Comment 2 Henri Sivonen (:hsivonen) 2012-03-27 05:16:25 PDT
*** Bug 738614 has been marked as a duplicate of this bug. ***
Comment 3 Henri Sivonen (:hsivonen) 2012-03-27 05:30:55 PDT
(In reply to Henri Sivonen (:hsivonen) from comment #0)
> See
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-January/034293.html

Hixie's reply: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-February/034869.html
Comment 4 Henri Sivonen (:hsivonen) 2012-03-27 05:43:36 PDT
Created attachment 609688 [details] [diff] [review]
Add a flag to nsDocument for tracking the situation where we've nulled out mParser due to termination but HTML says we should have an aborted active parser whose insertion point is defined
Comment 5 Henri Sivonen (:hsivonen) 2012-03-27 05:44:58 PDT
Setting tracking flags based on info in bug 738614 because the lack of this fix breaks a bank site.
Comment 6 Henri Sivonen (:hsivonen) 2012-03-27 05:48:04 PDT
Note that bug 98654 had regressed earlier in the sense that the test case there had started failing. The exact cause of that regression is unknown. Bug 738614 shows that fixing bug 715112 regressed bug 98654 even more. The fix here fixes both http://bnc.ca/ and the ancient test case from bug 98654.
Comment 7 Henri Sivonen (:hsivonen) 2012-03-27 05:56:23 PDT
Created attachment 609689 [details] [diff] [review]
Add a flag to nsDocument for tracking the situation where we've nulled out mParser due to termination but HTML says we should have an aborted active parser whose insertion point is defined, v2

v2: Keep document.write throwing in XHTML even if the parser has been aborted.
Comment 8 Henri Sivonen (:hsivonen) 2012-03-27 22:19:24 PDT
Thanks for the r+.

https://hg.mozilla.org/integration/mozilla-inbound/rev/e82fc6f3bceb
Comment 9 Ed Morley [:emorley] 2012-03-28 14:00:37 PDT
Please can you set the target milestone when landing on inbound, along the lines of http://blog.bonardo.net/2012/03/23/how-you-can-help-mozilla-inbound-sheriffs-when-pushing :-)

https://hg.mozilla.org/mozilla-central/rev/e82fc6f3bceb
Comment 10 Henri Sivonen (:hsivonen) 2012-03-31 07:18:03 PDT
Comment on attachment 609689 [details] [diff] [review]
Add a flag to nsDocument for tracking the situation where we've nulled out mParser due to termination but HTML says we should have an aborted active parser whose insertion point is defined, v2

[Approval Request Comment]
Regression caused by (bug #): Partially regressed by unknown landing and regressed even more by bug 715112
User impact if declined: Pages that set window.location first and then still call document.write won't work. An example is http://bnc.ca/ which is a bank, so the impact is bad for the customers of that bank.
Testing completed (on m-c, etc.): Has baken on m-c for a couple of days.
Risk to taking this patch (and alternatives if risky): Relatively low risk. Aligns us better with IE and WebKit. Very few changed lines of code. In theory could break something else but no breakage has been reported in a couple of days.
String changes made by this patch: None.
Comment 11 Alex Keybl [:akeybl] 2012-04-02 10:14:44 PDT
Comment on attachment 609689 [details] [diff] [review]
Add a flag to nsDocument for tracking the situation where we've nulled out mParser due to termination but HTML says we should have an aborted active parser whose insertion point is defined, v2

[Triage Comment]
Low-risk fix for a web regression in FF12. Approved for Aurora 13 and Beta 12 - please land asap.
Comment 16 Ioana (away) 2012-06-06 07:33:03 PDT
Verified this fix with the test case from bug 98654:
Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0
Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20100101 Firefox/14.0 BuildID: 20120605113340

Note You need to log in before you can comment on or make changes to this bug.