Closed
Bug 464560
Opened 17 years ago
Closed 17 years ago
Error: "this.setProperty is not a function" in calAttachment.js
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
VERIFIED
FIXED
1.0b1
People
(Reporter: ssitter, Assigned: Fallen)
References
Details
(Keywords: regression)
Attachments
(2 files)
|
968 bytes,
text/plain
|
Details | |
|
5.49 KB,
patch
|
dbo
:
review+
|
Details | Diff | Splinter Review |
Opening the attached ics file fails (with the errors listed below) using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081112 Calendar/1.0pre
Opening works fine using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9.
[[[
Error: this.setProperty is not a function
Source File: file:///E:/sunbird/modules/calUtils.jsm -> file:///E:/sunbird/calendar-js/calAttachment.js
Line: 162
]]]
[[[
Parsing the file failed:[Exception... "'[JavaScript Error: "this.setProperty is not a function" {file: "file:///E:/sunbird/modules/calUtils.jsm -> file:///E:/sunbird/calendar-js/calAttachment.js" line: 162}]' when calling method: [calIAttachment::icalProperty]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///E:/sunbird/modules/calUtils.jsm -> file:///E:/sunbird/calendar-js/calItemBase.js :: anonymous :: line 681" data: yes]
]]]
[[[
Warning: There has been an error reading data for calendar: test. It has been placed in read-only mode, since changes to this calendar will likely result in data-loss. You may change this setting by choosing 'Edit Calendar'. Error code: 0x80570021. Description: [Exception... "'[JavaScript Error: "this.setProperty is not a function" {file: "file:///E:/sunbird/modules/calUtils.jsm -> file:///E:/sunbird/calendar-js/calAttachment.js" line: 162}]' when calling method: [calIAttachment::icalProperty]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///E:/sunbird/modules/calUtils.jsm -> file:///E:/sunbird/calendar-js/calItemBase.js :: anonymous :: line 681" data: yes]
]]]
[[[
Warning: There has been an error reading data for calendar: test. Error code: READ_FAILED. Description:
]]]
| Assignee | ||
Comment 1•17 years ago
|
||
Taking, I have a patch about ready that just needs some testing. Aside from the obvious fix of using this.setParameter() (which btw also appears in calRelation.js), I noticed that setting the ical property doesn't seem to reset the property bag. Therefore a testcase similar to the following will fail:
let icalAttach1 = getICSService().createIcalProperty("ATTACH");
let icalAttach2 = getICSService().createIcalProperty("ATTACH");
let attach = cal.createAttachment();
icalAttach1.setParameter("X-THING", "FOO");
attach.icalProperty = icalAttach1;
do_check_eq(attach.getParameter("X-THING"), "FOO");
attach.icalProperty = icalAttach2;
do_check_eq(attach.getParameter("X-THING"), null);
Does this make sense? Or is there a use case for making the parameters stick?
Assignee: nobody → philipp
Updated•17 years ago
|
Flags: in-testsuite?
OS: Windows XP → All
Hardware: PC → All
Comment 2•17 years ago
|
||
IMO setting the icalProperty must fully reset the object; I think your test case makes sense.
Updated•17 years ago
|
Flags: blocking-calendar1.0?
| Assignee | ||
Comment 3•17 years ago
|
||
This should take care, requires iterators patch from bug 463047 to be applied.
Attachment #348194 -
Flags: review?(daniel.boelzle)
Updated•17 years ago
|
Status: NEW → ASSIGNED
Updated•17 years ago
|
Attachment #348194 -
Flags: review?(daniel.boelzle) → review+
Comment 4•17 years ago
|
||
Comment on attachment 348194 [details] [diff] [review]
Fix - v1
looks good; r=dbo
| Assignee | ||
Comment 6•17 years ago
|
||
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/892e9f783d9e>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Flags: in-testsuite+
Flags: blocking-calendar1.0?
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Comment 7•17 years ago
|
||
Checked in lightning build 20081130 -> VERIFIED.
Status: RESOLVED → VERIFIED
See Also: → https://launchpad.net/bugs/315732
| Assignee | ||
Comment 8•14 years ago
|
||
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•