Closed Bug 990400 Opened 11 years ago Closed 10 years ago

Don't import promise.js in toolkit/devtools/server/main.js

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 31

People

(Reporter: janx, Assigned: janx)

References

Details

Attachments

(1 file)

A merge conflict happened in main.js when bug 962577 landed with a use of `Promise` after bug 986481 had removed every occurence of it. This problem lead to a race condition, that was wrongly fixed in bug 988931 by importing `promise.js` again. Instead, main.js should use the preferred `Promise.jsm`.
> Instead, main.js should use the preferred `Promise.jsm` ... ... and export promise symbol with a lowercase.
(In reply to Alexandre Poirot (:ochameau) from comment #1) > > Instead, main.js should use the preferred `Promise.jsm` ... > > ... and export promise symbol with a lowercase. Actually I'm wrong, thanks to bug 986481, all devtools modules automagically have `promise` symbol in their global scope. So there is nothing to export. Just do a %s/Promise/promise/g
Comment on attachment 8399964 [details] [diff] [review] Don't import promise.js in toolkit/devtools/server/main.js. r=ochameau Review of attachment 8399964 [details] [diff] [review]: ----------------------------------------------------------------- Actually main.js has a `defer` function in the global scope that seems to do just what I want.
Attachment #8399964 - Flags: review?(poirot.alex)
That defer is coming from line 62 of main.js, which also imports addon-sdk promises, so this probably isn't the solution you want if the goal is to use Promise.jsm.
Comment on attachment 8399964 [details] [diff] [review] Don't import promise.js in toolkit/devtools/server/main.js. r=ochameau Review of attachment 8399964 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Brandon Benvie [:benvie] from comment #5) > That defer is coming from line 62 of main.js, which also imports addon-sdk > promises, so this probably isn't the solution you want if the goal is to use > Promise.jsm. +1
Attachment #8399964 - Flags: review?(poirot.alex) → review-
(In reply to Brandon Benvie [:benvie] from comment #5) > That defer is coming from line 62 of main.js, which also imports addon-sdk > promises, so this probably isn't the solution you want if the goal is to use > Promise.jsm. I only had 5mn for this patch, and saw where `defer` came from just after uploading, so I told Alex to r-. Will come back to this bug in a short while.
This was fixed by bug 995184.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 995184
Target Milestone: --- → Firefox 31
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: