Closed Bug 909211 Opened 11 years ago Closed 7 years ago

Clean up the promise usage in Scratchpad

Categories

(DevTools Graveyard :: Scratchpad, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bbenvie, Unassigned)

References

Details

Attachments

(1 file)

The use of promises in the Scratchpad can be cleaned up quite a bit.
Attached patch WIP1Splinter Review
This is an initial stab at it. The main thrust is that it wraps ObjectClient callbacks in promise returning functions. The trick with how the Scratchpad works is that ordering the promises correctly while still returning the [code, error, result] tuple. So it's like: * execute code -> results * do intermediate stuff that uses promises * resolve will results So it turns out to be a slightly bit hacky to do this, but it's still cleaner than the existing implementation.
Assignee: nobody → bbenvie
Status: NEW → ASSIGNED
Nick suggested to me that it would be better to complete bug 906202 (promisify the debugger client) before doing this. It would make the wrapping of ObjectClient methods I'm doing unnecessary.
Blocks: 910141
No longer blocks: 910141
Depends on: 910141
Unassigning for now until bug 910141 lands (which isn't actively being worked on yet).
Assignee: bbenvie → nobody
Priority: -- → P3
Bulk changing the status, as there is no assignee anymore. Sebastian
Status: ASSIGNED → NEW
Old refactoring bug that we have not touched in the past 4 years. Additionally, there are no instances of promise.defer in scratchpad anymore. So, closing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: