Bug 712414 - Throbber does not stop after running on pages that use document.write without document.close [r=mbrubeck]

This commit is contained in:
Mark Finkle 2011-12-21 16:34:02 -05:00
parent 63f2155a08
commit aa0544fe7d
3 changed files with 4 additions and 3 deletions

View File

@ -902,7 +902,7 @@ abstract public class GeckoApp
final int tabId = message.getInt("tabID");
int state = message.getInt("state");
Log.i(LOGTAG, "State - " + state);
if ((state & GeckoAppShell.WPL_STATE_IS_DOCUMENT) != 0) {
if ((state & GeckoAppShell.WPL_STATE_IS_NETWORK) != 0) {
if ((state & GeckoAppShell.WPL_STATE_START) != 0) {
Log.i(LOGTAG, "Got a document start");
handleDocumentStart(tabId);

View File

@ -106,6 +106,7 @@ public class GeckoAppShell
static public final int WPL_STATE_START = 0x00000001;
static public final int WPL_STATE_STOP = 0x00000010;
static public final int WPL_STATE_IS_DOCUMENT = 0x00020000;
static public final int WPL_STATE_IS_NETWORK = 0x00040000;
static private File sCacheFile = null;
static private int sFreeSpace = -1;

View File

@ -1526,8 +1526,8 @@ Tab.prototype = {
},
onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT) {
// Filter optimization: Only really send DOCUMENT state changes to Java listener
if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
// Filter optimization: Only really send NETWORK state changes to Java listener
let browser = BrowserApp.getBrowserForWindow(aWebProgress.DOMWindow);
let uri = "";
if (browser)