Closed Bug 509870 Opened 17 years ago Closed 17 years ago

Places transactions service should preserve GUIDS on created items

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.7a1
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: mak, Assigned: mak)

References

Details

Attachments

(1 file, 1 obsolete file)

browser_457473_no_copy_guid.js contains this comment: - // XXXdietrich fails since GUIDs are created lazily. the anno - // isn't present at the time the transaction is first executed, - // and undo just undoes the original transaction - doesn't pull - // in any new changes. Practically any create transaction, when undone and redone, does not preserve GUIDs, if you - create a new item (through a transaction) - get the item GUID - undo the creation - redo the creation - get the item GUID, this is not the same as above.
Attached patch wip 0.1 (obsolete) — — Splinter Review
this is basicly what we could do, solves the above XXX, but needs a more complete test.
Attached patch patch v1.0 — — Splinter Review
added a specific test
Assignee: nobody → mak77
Attachment #393951 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #396005 - Flags: review?(dietrich)
Comment on attachment 396005 [details] [diff] [review] patch v1.0 r=me for this change. would be nice to get a base class for things like this. but i guess i'd prefer a complete overhaul of these code instead :P
Attachment #396005 - Flags: review?(dietrich) → review+
http://hg.mozilla.org/mozilla-central/rev/3521b67756f6 sure, we have planned a transactions service overhaul, just better still fixing bugs :)
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Comment on attachment 396005 [details] [diff] [review] patch v1.0 asking approval for dataloss, for Weave or extensions that have to workaround this with fancy observers. has tests.
Attachment #396005 - Flags: approval1.9.2?
the risk is just some minor compatibility issue, extensions using the transaction manager and the GUIDS to achieve tasks are probably workarounding the problem resetting the GUID later, we are practically making that workaround useless. on the other side when we act on bookmarks in the UI with repeated undo/redo steps it won't cause anymore a new GUID to be generated, so extensions doing sync should have less work to do (and i suppose they are also workarounding this stuff in some fancy way). Even if there is some compatibility risk, i think the situations are pretty rare, and for syncing extensions that rely on those situations, having this patch should be largely better than workarounding it.
Comment on attachment 396005 [details] [diff] [review] patch v1.0 low risk, unlikely compat issues, has tests = a+.
Attachment #396005 - Flags: approval1.9.2? → approval1.9.2+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: