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)
Cloud Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
0.4
People
(Reporter: jwkbugzilla, Assigned: jwkbugzilla)
References
Details
Attachments
(1 file)
971 bytes,
patch
|
hello
:
review+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
Comment on attachment 381032 [details] [diff] [review]
Proposed patch
r=thunder
Attachment #381032 -
Flags: review?(thunder) → review+
Comment 3•16 years ago
|
||
Pushed:
http://hg.mozilla.org/labs/weave/rev/9da82b316800
Thanks!
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---
Version: Trunk → unspecified
Updated•16 years ago
|
QA Contact: weave → general
Updated•16 years ago
|
Target Milestone: --- → 0.4
You need to log in
before you can comment on or make changes to this bug.
Description
•