[e10s] test-tab.js causes unsafe CPOW usage warnings

RESOLVED FIXED in Firefox 50

Status

defect
P1
normal
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: mconley, Assigned: rpl)

Tracking

(Blocks 2 bugs)

unspecified
mozilla52
Dependency tree / graph

Firefox Tracking Flags

(e10s+, firefox50 fixed, firefox51 fixed, firefox52 fixed)

Details

(Whiteboard: [unsafe-cpow-usage])

Attachments

(1 attachment)

Mined from test logs

In addon-sdk/source/test/tabs/test-tab.js:

https://hg.mozilla.org/projects/holly/file/50e197279ad5/addon-sdk/source/test/test-tab.js#l66
https://hg.mozilla.org/projects/holly/file/50e197279ad5/addon-sdk/source/test/test-tab.js#l71
https://hg.mozilla.org/projects/holly/file/50e197279ad5/addon-sdk/source/test/test-tab.js#l72
https://hg.mozilla.org/projects/holly/file/50e197279ad5/addon-sdk/source/test/test-tab.js#l77
https://hg.mozilla.org/projects/holly/file/50e197279ad5/addon-sdk/source/test/test-tab.js#l78
https://hg.mozilla.org/projects/holly/file/50e197279ad5/addon-sdk/source/test/test-tab.js#l83

function step2(url, assert) {

  tabs.open({
    url: url,
    onReady: function(tab) {
      primaryTab = tab;
      let window = windowUtils.activeBrowserWindow.content;

      let matchedTab = getTabForWindow(window);
      assert.equal(matchedTab, tab,
        "We are able to find the tab with his content window object");

      let timer = require("sdk/timers");
      function waitForFrames() {
        let iframe = window.document.getElementById("iframe"); <-- causes unsafe CPOW usage warning
        if (!iframe) {
          timer.setTimeout(waitForFrames, 100);
          return;
        }
        iframeWin = iframe.contentWindow; <-- causes unsafe CPOW usage warning
        let subIframe = iframeWin.document.getElementById("sub-iframe"); <-- causes unsafe CPOW usage warning
        if (!subIframe) {
          timer.setTimeout(waitForFrames, 100);
          return;
        }
        let subIframeWin = subIframe.contentWindow; <-- causes unsafe CPOW usage warning
        let subSubIframe = subIframeWin.document.getElementById("sub-sub-iframe"); <-- causes unsafe CPOW usage warning
        if (!subSubIframe) {
          timer.setTimeout(waitForFrames, 100);
          return;
        }
        let subSubIframeWin = subSubIframe.contentWindow; <-- causes unsafe CPOW usage warning

        matchedTab = getTabForWindow(iframeWin);
        assert.equal(matchedTab, tab,
          "We are able to find the tab with an iframe window object");

        matchedTab = getTabForWindow(subIframeWin);
        assert.equal(matchedTab, tab,
          "We are able to find the tab with a sub-iframe window object");

        matchedTab = getTabForWindow(subSubIframeWin);
        assert.equal(matchedTab, tab,
          "We are able to find the tab with a sub-sub-iframe window object");

        // Put our primary tab in the background and test again.
        // The onActivate listener will take us to step3.
        auxTab.activate();
      }
      waitForFrames();
    }
  });
}
Reporter

Updated

4 years ago
tracking-e10s: m8+ → ---
Whiteboard: [unsafe-cpow-usage]
This is test only.
tracking-e10s: --- → +

Comment 2

3 years ago
Luca has fix believes
Flags: needinfo?(lgreco)
Assignee

Comment 3

3 years ago
The cpows usage described in Comment 0 has been fixed by Bug 1171515 (which has been merge into mozilla-central as part of Bug 1179013).

Nevertheless, in the meantime this test file has got a new single cpow usage which has been added by Bug 1179013, which means that I added the only cpow currently used in this test file :-(

This cpow usage can be removed by the tests by using the message manager to retrieve the current value of the document.readyState, without using the CPOW.

I'm attaching the patch that remove the cpow usage from this test, using the strategy described above.
Flags: needinfo?(lgreco)
Attachment #8802166 - Flags: review?(dtownsend)
Attachment #8802166 - Flags: review?(dtownsend) → review+
Assignee

Updated

3 years ago
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Assignee

Updated

3 years ago
Keywords: checkin-needed

Comment 5

3 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b4965bb11c0
Remove CPOW shim usage in SDK test-tab test related to tab.readyState. r=Mossop
Keywords: checkin-needed

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3b4965bb11c0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.