rem: driver.context.frameId = 0; 
add: var frames = window.content.frames; if (frames && frames.length && "FRAME" == frames[0].frameElement.tagName) { driver.context.frameId = 0; } else { driver.context.frameId = undefined; } 
context: window.addEventListener("load", function(e) {    var server = Utils.getServer();    server.onSocketAccepted = function(socket, transport) {        try {            this.outstream = transport.openOutputStream(0, 0, 0);            this.stream = transport.openInputStream(0, 0, 0);            this.instream = Utils.newInstance("@mozilla.org/scriptableinputstream;1", "nsIScriptableInputStream");            this.instream.init(this.stream);            var socketListener = new SocketListener(this.instream, driver);            var pump = Utils.newInstance("@mozilla.org/network/input-stream-pump;1", "nsIInputStreamPump");            pump.init(this.stream, -1, -1, 0, 0, false);            pump.asyncRead(socketListener, null);        } catch(e) {            dump(e);        }    }    server.startListening();    if (!driver) {        driver = new FirefoxDriver(server);        window.fxdriver = driver;        server.drivers.push(driver);    } else {        driver.context.frameId = 0;    }}, true);
meta: 3428	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3428/4efffd5b6409987c538da9b6a325c1614d0bca0e/server.js/buggy/firefox/src/extension/content/server.js