Closed Bug 547827 Opened 15 years ago Closed 15 years ago

JavaScript strict warning: modules/util.js, line 617: reference to undefined property thisObj[name]

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: zpao, Assigned: zpao)

Details

Attachments

(1 file)

Not sure how much we really care about these warnings, but I don't see any harm in fixing them... In the case when thisObj[name] doesn't exist, we get a JS strict warning. So we can just check if the property exists first before seeing if it's an instance of nsITimer.
Attached patch Patch v0.1Splinter Review
Added: name in thisObj &&
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #428286 - Flags: review?(edilee)
Comment on attachment 428286 [details] [diff] [review] Patch v0.1 Curious, do you see other undefined property warnings? I think deferGetSet triggers them, but some callers also expect |undefined|.
Attachment #428286 - Flags: review?(edilee) → review+
(In reply to comment #2) > Curious, do you see other undefined property warnings? I think deferGetSet > triggers them, but some callers also expect |undefined|. Yea, there's one in ClientStore.getInfo (related to wiping) which I'm looking at now.
Pushed http://hg.mozilla.org/labs/weave/rev/b53a4e63db18 Check that name is a property of thisObj before trying to access it.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.1
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: