Closed Bug 120277 Opened 23 years ago Closed 23 years ago

javascript strict warnings in CookieViewer.js

Categories

(Core :: Networking: Cookies, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: bugzilla, Assigned: morse)

Details

In 20020115 I see this when entering the Cookie Manager:

Warning: function CookieSelected does not always return a value
Source File: chrome://communicator/content/wallet/CookieViewer.js
Line: 198, Column: 13
Source Code:
  return true;
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
*** Bug 119812 has been marked as a duplicate of this bug. ***
The error for bug 119812 occurs at roughly the same time on linux 20020115
(during those steps to reproduce) so they should be fixed in the same patch I think.

Warning: reference to undefined property cookies[idx]
Source File: chrome://communicator/content/wallet/CookieViewer.js
Line: 173

They might be fixed in the same patch, but I'd prefer that they not be duped 
since the symptoms are different.

*** Bug 119812 is no longer a duplicate of this bug. ***
Unable to reproduce, but the fix is obvious.  Namely adding the word true to the 
first return statement in CookieViewer.js.  Specifically:

function CookieSelected() {
  var selections = GetOutlinerSelections(cookiesOutliner);
  if (selections.length) {
    document.getElementById("removeCookie").removeAttribute("disabled");
  } else {
    ClearCookieProperties();
    return true;             <<<<< added true here
  }

alecf, sgehani, please review
r=law
checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
v 20020221
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.