Closed
Bug 885318
Opened 11 years ago
Closed 11 years ago
Name collision with Promise
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 25
People
(Reporter: baku, Assigned: past)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
147.60 KB,
patch
|
jwalker
:
review+
|
Details | Diff | Splinter Review |
devtools use a lot of Promise objects implemented in JS. But bug 884279 renames Future to Promise and this makes a name collision. Talking on IRC on #devtools, we found 2 possible solutions: a) Rename Promise to JSPromise (or to something else) b) do some destructuring assignment on import, like: let {resolve, reject, etc. } = Cu.import("promise.js");
Updated•11 years ago
|
Component: General → Developer Tools
Product: Toolkit → Firefox
Comment 2•11 years ago
|
||
In a separate thread we'd decided that we should be doing s/Promise/promise/g. Would this solve the problem?
Reporter | ||
Comment 3•11 years ago
|
||
Yes, It does.
Assignee | ||
Comment 5•11 years ago
|
||
This turned out to be a lerger patch than I expected, due to us using lowercase promise as a local variable identifier. Maybe destructuring on import would have resulted in a shorter patch, but I don't know for sure or care. All tests pass locally.
Attachment #773344 -
Flags: review?(jwalker)
Assignee | ||
Comment 6•11 years ago
|
||
Try run: https://tbpl.mozilla.org/?tree=Try&rev=88c9960b5de1
Comment 7•11 years ago
|
||
Comment on attachment 773344 [details] [diff] [review] Rename Promise to promise to avoid collisions with the forthcoming DOM Promise implementation Review of attachment 773344 [details] [diff] [review]: ----------------------------------------------------------------- It's kind of annoying that we can't call 'promise' 'promise' any more. Ho Hum.
Attachment #773344 -
Flags: review?(jwalker) → review+
Comment 8•11 years ago
|
||
How about migrating to DOM Promise?
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #8) > How about migrating to DOM Promise? This bug is a prerequisite for DOM Future to be renamed to Promise. We will likely migrate to that once its ready and has all the API methods we need.
Assignee | ||
Comment 10•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/d5a0afa466c2
Whiteboard: [fixed-in-fx-team]
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d5a0afa466c2
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•