Closed Bug 276807 Opened 21 years ago Closed 21 years ago

add DumpJSValue helper function for debugging

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: Biesinger, Assigned: Biesinger)

Details

Attachments

(1 file, 1 obsolete file)

I have a patch to add a DumpJSValue function for easy printing of the value of a jsval. since it seems generally useful, I think it'd be good to check it in.
Attached patch patch (obsolete) — Splinter Review
Attachment #170115 - Flags: superreview?(brendan)
Attachment #170115 - Flags: review?(dbradley)
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
Comment on attachment 170115 [details] [diff] [review] patch Test JSVAL_IS_NULL before JSVAL_IS_OBJECT (or put the IS_NULL test inside the IS_OBJECT case), because typeof null == "object" (ancient botch, codified in ECMA and in SpiderMonkey). /be
Attachment #170115 - Attachment is obsolete: true
Attachment #170115 - Flags: superreview?(brendan)
Attachment #170115 - Flags: review?(dbradley)
Attached patch patch v2Splinter Review
Attachment #170181 - Flags: superreview?(brendan)
Attachment #170181 - Flags: review?(dbradley)
Comment on attachment 170181 [details] [diff] [review] patch v2 The printf should use null, not NULL -- the reserved id in JS is null (as in Java). With that, sr=me. /be
Attachment #170181 - Flags: superreview?(brendan) → superreview+
Comment on attachment 170181 [details] [diff] [review] patch v2 r=dbradley If you think of it to keep with local style, strike the space between if and the first paren "if(" Should be a handy diagnostic function, I know I've run across plenty of cases where it would have been useful.
Attachment #170181 - Flags: review?(dbradley) → review+
checked in with those two changes Checking in js/src/xpconnect/src/nsXPConnect.cpp; /cvsroot/mozilla/js/src/xpconnect/src/nsXPConnect.cpp,v <-- nsXPConnect.cpp new revision: 1.71; previous revision: 1.70 done
Status: ASSIGNED → RESOLVED
Closed: 21 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: