Closed Bug 495924 Opened 16 years ago Closed 16 years ago

TabTracker wrongly assumes that "this" pointer will be set correctly for event handlers

Categories

(Cloud Services :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwkbugzilla, Assigned: jwkbugzilla)

References

Details

Attachments

(1 file)

I see the following JavaScript strict warning in Error Console with trunk Weave build (the actual exception is probably swallowed somewhere): Warning: reference to undefined property this._log Source File: file:///.../extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/engines/tabs.js Line: 422 This is coming from the following line in onTabOpened: this._log.trace("Tab opened."); I am not sure what value "this" pointer gets for this event, it might be the tab that was opened or the tab container or the window. It will certainly not be the TabTracker object however, hence this._log is not defined. There is Utils.bind2() method, it should be used here - for this and for the other two event handlers.
Attached patch Proposed patchSplinter Review
Assignee: nobody → trev.moz
Status: NEW → ASSIGNED
Attachment #381032 - Flags: review?(thunder)
Comment on attachment 381032 [details] [diff] [review] Proposed patch r=thunder
Attachment #381032 - Flags: review?(thunder) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---
Version: Trunk → unspecified
QA Contact: weave → general
Target Milestone: --- → 0.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: