Closed
Bug 1197778
Opened 9 years ago
Closed 8 years ago
tabs.activeTab.attach() is failing with "window is null" (e10s)
Categories
(Firefox :: Extension Compatibility, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: ttyridal, Unassigned)
References
Details
(Whiteboard: [tabs, sdk] )
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150730171029 Steps to reproduce: testing my addon for e10s compatibility without shim on nightly 43.0a1 (2015-08-23) addon's main code does: var tabs = require("sdk/tabs"); var worker = tabs.activeTab.attach({ contentScriptFile: self.data.url('password-fill-cs.js') }); similar result with var worker = tabs.activeTab.attach({ contentScript: 'alert("hello");' }); Actual results: attached script is not loaded / run. Instead the following error is output on console: console.error: masterpassword-firefox: JPM [error] Message: TypeError: window is null Stack: @resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/content/worker.js:127:7 dispatch@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/method/core.js:119:12 initialize@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/content/worker.js:61:7 constructor@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/core/heritage.js:146:23 Worker@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/tabs/worker.js:11:16 Tab<.attach@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/tabs/tab-firefox.js:197:12 createPanel/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://jid1-pn4afskf9wbada-at-jetpack/lib/main.js:136:22 emitOnObject@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:112:9 emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:89:38 portEmit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/content/sandbox.js:350:7 emitOnObject@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:112:9 emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:89:38 onContentEvent/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/content/sandbox.js:391:5 delay/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/lang/functional/concurrent.js:38:20 notify@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/timers.js:40:9 Expected results: content script loaded and executed
oh, and with shim enabled (ie no permissions": {"multiprocess": true}}. it's working just fine.
Updated•9 years ago
|
Blocks: e10s-addons
tracking-e10s:
--- → +
Updated•8 years ago
|
Whiteboard: [tabs, sdk]
Updated•8 years ago
|
Updated•8 years ago
|
Blocks: triaged-tracking
Comment 2•8 years ago
|
||
I tried to reproduce this issue on 48 and on nightly, but I'm currently unable to reproduce it. By digging into the mercurial history a bit, it seems that it has been probably fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=1146603 (and then other further minor changes happened in the meantime) and the stacktrace attached to the issue seems to be related to this old (and non-e10s compatible for sure) version of these files (that are linked from the parent commit of the change introduced by bug 1146603): - https://hg.mozilla.org/mozilla-central/file/f5629f126257/addon-sdk/source/lib/sdk/tabs/tab-firefox.js#l197 - https://hg.mozilla.org/mozilla-central/file/f5629f126257/addon-sdk/source/lib/sdk/content/worker.js#l127 I'm going to close this issue as resolve/fixed, but feel free to re-open with an updated stacktrace and STR if you are still able to reproduce it.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•