Closed Bug 1388054 Opened 4 years ago Closed 2 years ago
Stop using Promise
.jsm from devtools/shared/defer
59 bytes, text/x-review-board-request
This change also results in this mochitest failure: devtools/client/framework/test/browser_target_events.js | A promise chain failed to handle a rejection: unsafe CPOW usage forbidden - stack: handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/event-emitter.js:83:7 emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/event-emitter.js:137:11 onLocationChange@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/target.js:789:9 This may relate to bug 1386299. Before event-emitter was in a JSM, it may have still be able to use CPOW, whereas it is clear that DevTools modules can't since bug 1355994 landed. This exception comes from this line: http://searchfox.org/mozilla-central/source/devtools/client/framework/target.js#789 which looks very outdated, broken and useless: 1) Navigate should come with an object as first argument, not a window object. Like this one: http://searchfox.org/mozilla-central/source/devtools/client/framework/target.js#534-538 2) It looks like there is no code using navRequest/navPayload: http://searchfox.org/mozilla-central/source/devtools/client/framework/target.js#552-558 3) It looks completely redundant with the tabNavigated event that the server should send: http://searchfox.org/mozilla-central/source/devtools/client/framework/target.js#561 It looks like setupListeners could possibly be completely redundant with setupRemoteListeners... It may be worth to also fix that in a dedicated bug.
This may be a dupe of bug 1438121, since stacks captured by Error also use SavedFrame. See bug 1438121 comment 16 for a summary of the cause.
I think that all the roadblocks have been adressed. Stacks have been fixed by Jim on bug 1438121 and EventEmitter have been fixed in bug 1386299. Let's see what try says today.
Try is green, we should be able to proceed with this patch, finally! https://treeherder.mozilla.org/#/jobs?repo=try&revision=1a600b75a946ec86cb7a42ca9de3cda0589a0f5f
Comment on attachment 8986433 [details] Bug 1388054 - Stop using Promise.jsm from devtools/shared/defer. https://reviewboard.mozilla.org/r/251794/#review258244 Great, thanks to everyone who helped here! :)
Attachment #8986433 - Flags: review?(jryans) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/0605328631fd Stop using Promise.jsm from devtools/shared/defer. r=jryans
Backed out changeset 0605328631fd (bug 1388054) for failing in devtools/client/shadereditor/test/browser_se_aaa_run_first_leaktest.js on a CLOSED TREE Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=0605328631fda3d73bf749db3b3f2d3cc652a1ae&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=pending&filter-resultStatus=running&filter-resultStatus=success&filter-searchStr=dt7&selectedJob=184032026 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=184032026&repo=autoland&lineNumber=2096 Backout: https://hg.mozilla.org/integration/autoland/rev/30ef0ff424054f15fb9dee7203cd73eac30f9c9e
Ah. Right. Shader editor may be really run only on osx because it needs webgl to work on CI. Now, it is unclear why it makes this test to fail except just being a race. It should not be related to panel's document promises as defer is using a system Promise...
Flags: needinfo?(past) → needinfo?(poirot.alex)
Assignee: nobody → poirot.alex
You need to log in before you can comment on or make changes to this bug.