Closed Bug 136959 Opened 23 years ago Closed 4 years ago

Creation of document via document.write() fails if memory cache is set to 0

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Unassigned)

References

()

Details

BUILD: 2002-04-10-08. STEPS TO REPRODUCE: 1) Set memory cache to 0 2) Load url in url field of this bug 3) Click the button on the resulting page EXPECTED RESULTS: New page created via document.write() ACTUAL RESULTS: Blank page is created, error printed to console in debug builds I strongly suspect that wyciwyg is failing to deal with lack of a memory cache...
I think the problem is with the testcase. I see some assertions in ASSERTION: no body node: 'bodyContent', file d:\0409\mozilla\layout\html\ style\src\nsCSSRendering.cpp, line 2468 when loading the testcase attached here. With memory and disk cache set to 0 and all cache cleared, i'm able to load a dynamic page. For example, go to http://webcenter.shop.aol.com/collectibles/index.adp and click on NBA store on the RHS. The page loads successfully. You can see the debug message in the console that it was a wyciwyg page. However, back, forward and reload of the page will fail, because, the page was not stored in cache. I also have these simple testcases which load just fine. <html> <head> <title>PAGE1</title> <script type="text/javascript"> function secondpage() { document.open(); document.write("<html>"); document.write("<head><title>PAGE2</title></head>"); document.write("<body>Second Page</body>"); document.write("</html>"); document.close(); } </script> </head> <body> <form> <input type="button" onclick="secondpage()" value="Go to Second Page"> </form> </body> </html> <html> <head> <title>refresh document.write frameset</title> <script> function getfs() { var html = ''; html += '<frameset rows="*,*">'; html += '<frame src="http://www.mozilla.org/">'; html += '<frame src="http://bugzilla.mozilla.org/">'; html += '<\/frameset>'; document.write(html); return false; } </script> </head> <body> <p> Howdie </p> <form> <input type="submit" type="button" onclick="getfs()" value="Get Frameset"> </form> </body> </html>
> I think the problem is with the testcase. I see some assertions in > ASSERTION: no body node: 'bodyContent', file d:\0409\mozilla\layout\html\ > style\src\nsCSSRendering.cpp, line 2468 I see those too, sure. The problem disappears when I remove the <meta> element from the testcase (that element triggers a reload from cache right now, and the cache is off, so we reload from network, except there is no network for wyciwyg urls).
I guess that explains the problem. when cache is zero, you can not, reload/back/forward/go to it. Is this a WFM now?
Well.. if you feel that this is just a dup of the bug about that <meta> tag forcing a reload, I'll mark it so. Otherwise, this needs to get fixed somehow, as pages may fail to work when cache is set to 0...
Do you have the other bug number, so I can decide, if this is really a dupe of that. I guess what you are trying to say here is, documen.write() should work in pages that have these meta tags. Is that right?
The bug is bug 61363. What I'm trying to say is that even when memory cache is off, a page that's created completely via document.write() and includes a <meta> charset should not just completely fail to load.
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
Assignee: general → nobody
QA Contact: desale → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5

Hey Boris,
Can you still reproduce this issue or should we close it?

Flags: needinfo?(bzbarsky)

wyciwyg:// is long gone. Fixed in bug 1489308.

Status: NEW → RESOLVED
Closed: 4 years ago
Depends on: 1489308
Flags: needinfo?(bzbarsky)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.