Bug 864152 - Fix for intermittent browser_webconsole_network_panel.js | uncaught exception - TypeError: imageNode or elem is null at resource:///modules/devtools/webconsole/network-panel.js. r=me, a=test-only
authorMihai Sucan <mihai.sucan@gmail.com>
Tue, 10 Sep 2013 14:08:53 +0300
changeset 154010 73d17e08f04d0b66d617615cde9493bda38ce4b9
parent 154009 9988311c6dae009d00aaa5c73f7a98378b9584a5
child 154011 f53ed314d01f3bac6b01325577eac0df4b8bea9b
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, test-only
bugs864152
milestone25.0a2
Bug 864152 - Fix for intermittent browser_webconsole_network_panel.js | uncaught exception - TypeError: imageNode or elem is null at resource:///modules/devtools/webconsole/network-panel.js. r=me, a=test-only
browser/devtools/webconsole/network-panel.js
--- a/browser/devtools/webconsole/network-panel.js
+++ b/browser/devtools/webconsole/network-panel.js
@@ -670,19 +670,17 @@ NetworkPanel.prototype =
 
   /**
    * Updates the content of the NetworkPanel's iframe.
    *
    * @returns void
    */
   update: function NP_update()
   {
-    // After the iframe's contentWindow is ready, the document object is set.
-    // If the document object is not available yet nothing needs to be updated.
-    if (!this.document || !this.document.getElementById("headUrl")) {
+    if (!this.document || this.document.readyState != "complete") {
       return;
     }
 
     let updates = this.httpActivity.updates;
     let timing = this.httpActivity.timings;
     let request = this.httpActivity.request;
     let response = this.httpActivity.response;