Closed Bug 1093480 Opened 10 years ago Closed 6 years ago

Implement an asynchronous transaction manager module

Categories

(Toolkit :: Async Tooling, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: WeirdAl, Assigned: WeirdAl)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

I think I will break this patch up into several incremental patches: * Inline API documentation, errors and basic infrastructure (stack of transactions, PromiseAction, isInTransaction) * doTransaction * undoTransaction * redoTransaction * Transaction listeners * Merging transactions * Transaction metadata * Undo / redo stacks (getting, clearing) Each phase will have its own tests as well.
Attachment #8519454 - Flags: review?(dteller)
Can you describe the expected use case for this ATM?
Flags: needinfo?(ajvincent)
Comment on attachment 8519454 [details] [diff] [review] part 1: Define the API. Review of attachment 8519454 [details] [diff] [review]: ----------------------------------------------------------------- At first glance, the API looks sound, but I can't review it until I have a good idea of the usecase.
Attachment #8519454 - Flags: review?(dteller)
The immediate use case is Firefox's addons manager: http://hg.mozilla.org/mozilla-central/annotate/ae27ae77e32f/toolkit/mozapps/extensions/internal/XPIProvider.jsm#l297 You may recall that the AOM uses several sychronous nsIFile operations to update an addon, for instance. AOM's actually implementing a simple transaction with its SafeInstallOperation code. Bug 945540 is about converting to OS.File and Promises for asynchronous operations, so it could use the Transaction code I've implemented. (That being said, AOM may not require the full AsyncTransactionManager, just a singleton Transaction. I'm willing to redesign for that purpose only, if you require this.) Mozilla's built-in transaction manager component (editor/txmgr) supports undo/redo operations in general, but is not designed for asynchronous operations. I implemented AsyncTransactionManager for that purpose in my Verbosio project, so that I could have undo and redo capabilities for async, atomic changes.
Flags: needinfo?(ajvincent)
Is this still desirable? Thanks to a spammy comment, I was forced to revisit this briefly. XPIProvider seems to be deprecated code, with the advent of Web Extensions.
Kris, please answer comment 6.
Flags: needinfo?(kmaglione+bmo)
(In reply to Alex Vincent [:WeirdAl] from comment #6) > Is this still desirable? Thanks to a spammy comment, I was forced to > revisit this briefly. XPIProvider seems to be deprecated code, with the > advent of Web Extensions. It should no longer be necessary.
Flags: needinfo?(kmaglione+bmo)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
No longer blocks: 945540
Blocks: 1462855
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: