Closed Bug 329806 Opened 19 years ago Closed 19 years ago

nsStorageFormHistory needs to recognize endianness marker when importing old mork db

Categories

(Toolkit :: Form Manager, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

Details

(Keywords: fixed1.8.1)

Attachments

(2 files)

In bug 328982, I added endianness markers to the formhistory.dat mork db. This file is being replaced, effective 1.8.1, with a sqlite db implemented in nsStorageFormHistory. There is an importer that uses morkreader to import formhistory.dat. It needs to recognize the new endianness marker. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/components/satchel/src/nsStorageFormHistory.cpp&rev=1.6&mark=569#557 The importer should use the same heuristics as nsFormHistory to decide what to do when no endianness marker is present.
Flags: blocking-firefox2+
This mostly follows nsMorkHistoryImporter.
Attachment #214471 - Flags: first-review?(bryner)
Changes: - Mask out high-order 8 bytes when right shifting because the behavior of the sign bit is undefined - Add a pair of casts to avoid warnings about enum mismatches (the generated header puts each item in its own enum) - Don't attempt to read byte order when not set in history.db (as in upgrades from 1.0.x to 2.0) - Don't byte-swap when byte order is set to something unrecognizable
Attachment #214472 - Flags: first-review?(bryner)
Attachment #214471 - Flags: first-review?(bryner) → first-review+
Attachment #214472 - Flags: first-review?(bryner) → first-review+
Both patches have been checked in on the trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #214471 - Flags: approval-branch-1.8.1?(bryner)
Attachment #214472 - Flags: approval-branch-1.8.1?(bryner)
Attachment #214471 - Flags: approval-branch-1.8.1?(bryner) → approval-branch-1.8.1+
Comment on attachment 214472 [details] [diff] [review] nsMorkHistoryImporter fixes fwiw all checkins to places code (browser/components/places/ and nsStorageFormHistory) should be committed on the branch at the same time as the trunk.
Attachment #214472 - Flags: approval-branch-1.8.1?(bryner) → approval-branch-1.8.1+
OK, on 1.8 now. What ever happened to the idea of automatically syncing the trunk and branch in toolkit and browser?
Keywords: fixed1.8.1
Component: Satchel → Form Manager
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: