Closed Bug 398139 Opened 17 years ago Closed 17 years ago

X-prop parameters get corrupted.

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: dbo, Assigned: dbo)

Details

(Keywords: dataloss)

Attachments

(3 files)

1. subscribe to the attached ics file.
2. Pose some modification to the calendar.
=> X-PROP;X-foo=bar2:baz2 gets trashed
Attached file sample ics
Attached patch fixSplinter Review
Bug in inheritance code of CalEvent/CalTodo.
Assignee: nobody → daniel.boelzle
Status: NEW → ASSIGNED
Attachment #282999 - Flags: review?(philipp)
Comment on attachment 282999 [details] [diff] [review]
fix

-    __proto__: calItemBase ? (new calItemBase()) : {},
+    __proto__: calItemBase.prototype,


The old code checks if there is even a calItemBase, the new one just assumes its there and sets the prototype. It seems safe to assume that calItemBase is defined. I'm no expert on JS inheritance, but it does seem to work.

r=philipp
Attachment #282999 - Flags: review?(philipp) → review+
The check I've removed has wondered me: Even if calEvent.js has been loaded before calItemBase.js, it's of no use anyway. The objects won't work, but we only avoid the loader to barf.
Whiteboard: [checkin-needed after 0.7]
Checked in on HEAD and MOZILLA_1_8_BRANCH.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed after 0.7]
Target Milestone: --- → 0.8
I checked this issue with the nightly build 20071108, but this issue isn't fixed.

before modifying: X-PROP;X-foo=bar1:baz1
after modifying:  X-PROP:baz1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
The first patch has only untouched items. This patch fixes item cloning, so params of X-props don't get lost on modification.
Attachment #287987 - Flags: review?(philipp)
Comment on attachment 287987 [details] [diff] [review]
fixing item cloning

r=philipp
Attachment #287987 - Flags: review?(philipp) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH.
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Checked in latest nightly build -> task is fixed and verified. 
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.