pageMod worker tab becomes false, = undefined



Add-on SDK
2 years ago
5 months ago


(Reporter: tim, Unassigned)


Firefox Tracking Flags

(Not tracked)





2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

Steps to reproduce:

create worker using pageMod, open up some pages, then drag out one of the pages

Actual results:

the worker corresponding to the dragged out page gets .tab = false, so that = undefined. This makes it not possible to find in an activeTabs search 

Expected results:

the worker gets an updated tab and


2 years ago


2 years ago
OS: Unspecified → Windows
Hardware: Unspecified → x86_64

Comment 1

2 years ago
I have the same problem in nightly 48.0a1 (2016-03-16).

console.log: capturemoz: pipeWorker: waiting for connection...
console.log: capturemoz: pipeWorker: connected.
console.log: capturemoz: attaching pageWorker in -5-1
console.log: capturemoz: showing page in -5-1
console.log: capturemoz: attaching pageWorker in -5-2
console.log: capturemoz: showing page in -5-2
<at this point I drag out the window>
console.log: capturemoz: hiding page in undefined
console.log: capturemoz: showing page in undefined
``` is undefined, and tab = false

Comment 2

2 years ago
Any testcase?
Component: Activity Streams: General → DOM
Product: Firefox → Core

Comment 3

2 years ago
Make a new jpm project, and replace index.js with this. Then make a blank worker.js. Use jpm run to start Firefox and go to Google in two tabs. Then drag out one of the tabs.

var self = require("sdk/self");
var pageMod = require("sdk/page-mod");

exports.main = function(options, callbacks) {
	  include: "*",
	  contentScriptWhen: "ready",
	  contentScriptFile: ["./worker.js"],
	//  attachTo: ["existing", "top"],
	  onAttach: function(pageWorker) { =;
		  console.log('attaching pageWorker',,'in tab.ids',;
			pageWorker.on('pageshow', function() {
				console.log('showing pageWorker',,'in tab.ids',;
			pageWorker.on('pagehide', function() {
				console.log('hiding pageWorker',,'in tab.ids',;
	    pageWorker.on('detach', function() {
				console.log('detaching pageWorker',,'in tab.ids',;

Comment 4

2 years ago
Thanks for taking a look Loic. I updated the github repo with photos. Pls take a look and let me know if you need anything else.
I don't think is a DOM thing (but I could be wrong).
Component: DOM → Tabbed Browser
Product: Core → Firefox


2 years ago
Component: Tabbed Browser → General
Product: Firefox → Add-on SDK
Version: 45 Branch → unspecified
Last Resolved: 5 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.