Closed
Bug 967879
Opened 10 years ago
Closed 9 years ago
DOMHelpers.onceDOMReady should return a promise
Categories
(DevTools :: Framework, defect)
DevTools
Framework
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jwalker, Assigned: jwalker)
Details
Attachments
(1 file)
4.70 KB,
patch
|
bbenvie
:
feedback+
|
Details | Diff | Splinter Review |
Die, callbacks. Die. Maybe we don't care about DOMHelpers much, but this could result in quite a bit of code simplification. It's a bit of a drive-by patch and uses the wrong promise lib right now.
Attachment #8370383 -
Flags: feedback?(bbenvie)
Assignee | ||
Updated•10 years ago
|
Component: Developer Tools → Developer Tools: Framework
Comment 1•10 years ago
|
||
Comment on attachment 8370383 [details] [diff] [review] domhelper.patch Review of attachment 8370383 [details] [diff] [review]: ----------------------------------------------------------------- This looks like a welcome cleanup; promises compose much more cleanly with other promises. I think you *may* have to keep using the addon-sdk's promise implementation with where this is currently being used, until bug 943510 lands. You should definitely try using Promise.jsm first and see if it works. If not then feel free to fall back to using addon-sdk's promise. ::: browser/devtools/shared/DOMHelpers.jsm @@ +157,2 @@ > // We want to avoid that so we execute the callback in the next queue. > Services.tm.mainThread.dispatch(callback, 0); This should be conditional since callback will be optional now. @@ +157,4 @@ > // We want to avoid that so we execute the callback in the next queue. > Services.tm.mainThread.dispatch(callback, 0); > + > + promise.resolve(undefined); deferred.resolve
Attachment #8370383 -
Flags: feedback?(bbenvie) → feedback+
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jwalker
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•