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)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 31
People
(Reporter: janx, Assigned: janx)
References
Details
Attachments
(1 file)
(deleted),
patch
|
ochameau
:
review-
|
Details | Diff | Splinter Review |
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`.
Comment 1•11 years ago
|
||
> Instead, main.js should use the preferred `Promise.jsm` ...
... and export promise symbol with a lowercase.
Comment 2•11 years ago
|
||
(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
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
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)
Comment 5•11 years ago
|
||
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 6•11 years ago
|
||
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-
Assignee | ||
Comment 7•11 years ago
|
||
(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.
Assignee | ||
Comment 8•10 years ago
|
||
This was fixed by bug 995184.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•