Author: [email protected] Date: Tue Jun 9 13:47:07 2009 New Revision: 5530 Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js
Log: Fixes obscure failure in linux hybrid-mode unit tests Review: http://gwt-code-reviews.appspot.com/33847 Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java ============================================================================== --- trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java (original) +++ trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java Tue Jun 9 13:47:07 2009 @@ -208,7 +208,7 @@ out.print("if ($wnd." + context.getModuleFunctionName() + ") $wnd." + context.getModuleFunctionName() + ".onScriptLoad();"); out.newline(); - out.print("--></script></body></html>"); + out.print("--></script>"); out.newlineOpt(); return out.toString(); @@ -249,11 +249,10 @@ private String getModulePrefix(LinkerContext context, String strongName, boolean supportRunAsync) { DefaultTextOutput out = new DefaultTextOutput(context.isOutputCompact()); - out.print("<html>"); out.newlineOpt(); // Setup the well-known variables. - out.print("<head><script>"); + out.print("<script>"); out.newlineOpt(); out.print("var $gwt_version = \"" + About.getGwtVersionNum() + "\";"); out.newlineOpt(); @@ -306,9 +305,8 @@ + "',subSystem:'startup',evtGroup:'moduleStartup'" + ",millis:(new Date()).getTime(),type:'moduleEvalStart'});"); out.newlineOpt(); - out.print("</script></head>"); + out.print("</script>"); out.newlineOpt(); - out.print("<body>"); out.newlineOpt(); // Begin a script block inside the body. It's commented out so that the Modified: trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js ============================================================================== --- trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js (original) +++ trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js Tue Jun 9 13:47:07 2009 @@ -350,14 +350,17 @@ win.name = '__MODULE_NAME__'; } + // Set this *before* calling doc.write(), because the linux hosted-mode + // browser sometimes doesn't properly return from doc.write() if there are + // a large number of script blocks (even though it works fine). Go figure. + gwtFrameCreated = true; + // Inject the fetched script into the script frame. // (this script will call onScriptLoad()) var doc = win.document; doc.open(); doc.write(compiledScript); doc.close(); - gwtFrameCreated = true; - maybeStartModule(); } } --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
