Closed Bug 1164887 Opened 10 years ago Closed 10 years ago

Toggle rulers for page command isn't working

Categories

(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)

defect
Not set
normal

Tracking

(firefox39 unaffected, firefox40 affected, firefox41 affected)

RESOLVED DUPLICATE of bug 1147826
Tracking Status
firefox39 --- unaffected
firefox40 --- affected
firefox41 --- affected

People

(Reporter: bgrins, Unassigned)

References

Details

(Whiteboard: [polish-backlog][difficulty=easy])

Attachments

(1 file)

When pressing the command button, I see this error (due to Bug 1128988): Error: environment.chromeWindow is not available in runAt:server commands Stack trace: GcliActor<._getRequisition/this._requisitionPromise</environment.chromeWindow@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/gcli.js:256:17 exports.items<.exec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/commands/rulers.js:59:9 Requisition.prototype.exec/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/cli.js:2073:16 createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:239:18 Task_spawn@resource://gre/modules/Task.jsm:164:12 exports.exec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/util/host.js:72:10 Requisition.prototype.exec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/cli.js:2072:14 Requisition.prototype.updateExec/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/gcli/cli.js:2112:12 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:867:23 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:746:7 this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:688:37 Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:688:5 this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:709:7 Promise.prototype.then@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:417:5 GcliActor<.execute<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/gcli.js:116:12 actorProto/</handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/protocol.js:1006:19 DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1456:15 LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14 makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
I suspect that the solution for bug 1164537 would fit here.
Does that make sense Matteo?
Flags: needinfo?(zer0)
Whiteboard: [devedition-40][difficulty=easy]
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Flags: needinfo?(zer0)
Attachment #8607093 - Flags: review?(jwalker) → review+
This command should run on the server, not the client. The ruler is a kind of highlighter (see toolkit/devtools/server/actors/highlighter.js), and as such, it needs to inject its content into the native anonymous content in the page, so it really needs access to the page, especially to detect scroll and refresh when it happens (with the patch applied, the ruler doesn't manage to scroll correctly). So this command should instead work like the highlight command, which runs on the server. I'm in the process of cleaning the highlight command a little bit in bug 1147826 to avoid having to depend on the tabActor.
I might have a fix for this in bug 1147826. I need to work on it some more, but if it turns out to be working, I'll mark this one as duplicate.
That sounds like a reasonable approach! I'll leave this one alone then.
Assignee: jryans → nobody
Status: ASSIGNED → NEW
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Whiteboard: [devedition-40][difficulty=easy] → [polish-backlog][difficulty=easy]
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: