Closed
Bug 119812
Opened 23 years ago
Closed 23 years ago
javascript strict warnings in CookieViewer.js
Categories
(Core :: Networking: Cookies, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: bugzilla, Assigned: morse)
Details
Attachments
(1 file, 1 obsolete file)
753 bytes,
patch
|
samir_bugzilla
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
When I remove a cookie from Cookie Manager
Warning: reference to undefined property cookies[idx]
Source File: chrome://communicator/content/wallet/CookieViewer.js
Line: 173
build 20020111
Comment 1•23 years ago
|
||
I get both of these (this bug and 120277) at the same time. Duping up.
*** This bug has been marked as a duplicate of 120277 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 2•23 years ago
|
||
I wish you wouldn't dup them. The symptoms are entirely different.
What if I determine that one report is invalid and I fix the other. Do I close
the bug report out as invalid or fixed? What if I have to reassign one of them
to another person.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 3•23 years ago
|
||
Morse: sorry. Some other owners prefer to dupe strict warnings into one patch.
I won't do it again!
Assignee | ||
Comment 4•23 years ago
|
||
Am unable to reproduce. tever, can you reproduce this one?
Reporter | ||
Comment 5•23 years ago
|
||
getting this every time I delete a cookie from the Cookie Manager.
And you do have strict warn on and everything?
Assignee | ||
Comment 6•23 years ago
|
||
Yes, I do have strict warn on. Is that "everything"?
Reporter | ||
Comment 7•23 years ago
|
||
please try this to reproduce:
1) use a fresh new profile
2) enable js strict warns
3) go to http://opasia.dk
4) open js console
5) open cookie manager
6) select of of the two cookies and press Remove Cookie
7) watch the js console...
Warning: reference to undefined property cookies[idx]
Source File: chrome://communicator/content/wallet/CookieViewer.js
Line: 241
Assignee | ||
Comment 8•23 years ago
|
||
OK, now I can reproduce.
Assignee | ||
Comment 9•23 years ago
|
||
Not sure exactly why this is happening. When the CookieSelected() method of
CookieViewer.js is entered, the value of selections[0] (i.e., the first element
in the selections array) has a value greater than the number of elements in the
cookie list.
So where is this call to CookieSelected() occuring? It is happening in the
DeleteSelectedItemFromOutliner() method in nsWalletTreeUtils.js. Specifically
it is happening just after the following line is executed:
box.rowCountChanged(0, table.length);
This is to be expected. However if I dump out the value of the first element in
the selections array just prior to this statement, it is a valid value.
So it looks like some sort of synchronization problem. The easiest thing to do
here is just add some bulletproofing to catch this lack of synchronization.
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
alecf, sgehani, please review. Thanks.
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Comment 12•23 years ago
|
||
Comment on attachment 69689 [details] [diff] [review]
Add bulletproofing
let's put a dump() in there to encourage people to help you track it down....
Assignee | ||
Comment 13•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #69689 -
Attachment is obsolete: true
Comment 14•23 years ago
|
||
Does this out-of-sync stat cause loss of functionality? Would using a timeout
be helpful here (i.e., setTimeout(<func>, 0))? Should we try and understand the
underlying issue so that other clients could benefit?
Comment 15•23 years ago
|
||
Comment on attachment 69697 [details] [diff] [review]
Added dump statement per reviewer's request
sr=alecf
Attachment #69697 -
Flags: superreview+
Assignee | ||
Comment 16•23 years ago
|
||
No, it doesn't cause loss of functionality. There is another pending call to
CookieSelected() that will occur just after this one, and that one has a valid
value. So it will perform the desired functions.
It's not worth investigating the underlying cause at this time because we have
bigger fish to fry.
Comment 17•23 years ago
|
||
Comment on attachment 69697 [details] [diff] [review]
Added dump statement per reviewer's request
r=sgehani
Attachment #69697 -
Flags: review+
Assignee | ||
Comment 18•23 years ago
|
||
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 20•22 years ago
|
||
If this bug was fixed in Feb 2002 why do I still get the dump message in
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826.
"Tree and viewer state are out of sync! Help us figure out the problem in bug
119812D"
If it really is fixed why not drop the dump message.
By the way I got the message trying to delete a 2nd cookie from a site I had
blocked when I deleted the first !
You need to log in
before you can comment on or make changes to this bug.
Description
•