Closed Bug 356496 Opened 18 years ago Closed 18 years ago

calUtils.js LOG() doesn't work correctly on string primitives like toXMLString()

Categories

(Calendar :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Sunbird 0.5

People

(Reporter: mattwillis, Assigned: mattwillis)

Details

Attachments

(1 file)

If an item to be LOGged is a string primitive, but not a String object, (such as the output of toXMLString() ), LOG() splits the item up like so: Logging object... 0: g 1: e 2: t 3: I 4: t 5: e 6: m 7: s 8: ( 9: ) 10: : 11: 12: q 13: u 14: e 15: r 16: y 17: i 18: n 19: g 20: 21: C 22: a 23: l 24: D 25: A 26: V 27: 28: s 29: e 30: r 31: v 32: e 33: r 34: 35: f 36: o 37: r 38: 39: e 40: v 41: e 42: n 43: t 44: s 45: : 46: 47: 48: < 49: ? 50: x 51: m 52: l 53: 54: v 55: e 56: r 57: s 58: i 59: o 60: n 61: = 62: " 63: 1 64: . 65: 0 66: " 67: 68: e 69: n 70: c 71: o 72: d
Assignee: nobody → lilmatt
Status: NEW → ASSIGNED
Attachment #242127 - Flags: first-review?(jminta)
Comment on attachment 242127 [details] [diff] [review] adds check for string primitive + // We should dump() both String objects, and string primitives. + if (!(aArg instanceof String) && !(typeof(aArg) === "string")) { include a 'just' in the comment, and lose one of the = please. r1/r2=jminta
Attachment #242127 - Flags: first-review?(jminta) → first-review+
Patch with nits checked in on MOZILLA_1_8_BRANCH and trunk. -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: