test-content-events is leaking an event listener and spamming the test output

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mossop, Assigned: jsantell)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Test logs show many outputs of this form after the panel tests start:

console.error: addon-sdk: 
  Message: TypeError: target.URL is undefined
  Stack:
    exports["test multiple tabs"]/<@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://extensions.modules.9be77f16-617c-4736-8b4e-c1402a8c01c1-at-jetpack.commonjs.path.tests/test-content-events.js:51
lazy@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:110
emit@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:83
@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:82
lazy@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:110
emit@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:83
@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/chrome.js:36
emit@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/events.js:38
onContentChange@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/panel/utils.js:260
@resource://gre/modules/XPIProvider.jsm -> jar:file:///c:/users/cltbld~1.t-w/appdata/local/temp/tmphl_azf.mozrunner/extensions/9be77f16-617c-4736-8b4e-c1402a8c01c1@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/events.js:62

Looks like the event listener added in test-content-events:test multiple tabs is leaking somehow. Can you take a look at this Irakli?
Flags: needinfo?(rFobic)
Dave given that I'll be on PTO and would like to finish tasks that I've being working on before that, I'd prefer if someone else could take a look into this.
Flags: needinfo?(rFobic)
I'll scope it out
Assignee: nobody → jsantell
Created attachment 799375 [details]
GH PR 1229
Attachment #799375 - Flags: review?(dtownsend+bugmail)
(Assignee)

Updated

5 years ago
Duplicate of this bug: 906792
(Reporter)

Updated

5 years ago
Attachment #799375 - Flags: review?(dtownsend+bugmail) → review+

Comment 5

5 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/09e4db4687e2838a79917acdb0d240e2012f518e
Bug 911126 fix leaky content-events test

https://github.com/mozilla/addon-sdk/commit/97838a05df7343ff1cf266b1899512709473d222
Merge pull request #1229 from jsantell/leaky-test

Fix Bug 911126 fix leaky content-events test, r=@mossop

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.