Closed Bug 283851 Opened 20 years ago Closed 20 years ago

javascript strict warnings in nsBrowserContentHandler.js

Categories

(Firefox :: General, defect, P5)

defect

Tracking

()

RESOLVED FIXED
Firefox1.5

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050226 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050226 Firefox/1.0+

http://lxr.mozilla.org/seamonkey/source/browser/components/nsBrowserContentHandler.js#172
and
http://lxr.mozilla.org/seamonkey/source/browser/components/nsBrowserContentHandler.js#306

Reproducible: Always

Steps to Reproduce:
Those assignments are done on purpose, and the strict warnings are just there to
catch possible mistakes. They don't require fixing.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Summary: javascript strict warnings in nsBrowserContentHandler.js → javascript strict warnings in nsBrowserContentHandler.js
I realize this and doing the following should allow for the assignment while
removing the warning.

Index: nsBrowserContentHandler.js
===================================================================
RCS file: /cvsroot/mozilla/browser/components/nsBrowserContentHandler.js,v
retrieving revision 1.4
diff -u -r1.4 nsBrowserContentHandler.js
--- nsBrowserContentHandler.js	19 Feb 2005 01:36:59 -0000	1.4
+++ nsBrowserContentHandler.js	26 Feb 2005 20:34:48 -0000
@@ -169,7 +169,7 @@
 
     try {
       var uriparam;
-      while (uriparam = cmdLine.handleFlagWithParam("new-window", false)) {
+      while ((uriparam = cmdLine.handleFlagWithParam("new-window", false))) {
         var uri = cmdLine.resolveURI(uriparam);
         openWindow(null, this.chromeURL, "_blank",
                    "chrome,dialog=no,all" + this.getFeatures(cmdLine),
@@ -303,7 +303,7 @@
 
     try {
       var ar;
-      while (ar = cmdLine.handleFlagWithParam("url", false)) {
+      while ((ar = cmdLine.handleFlagWithParam("url", false))) {
         urilist.push(cmdLine.resolveURI(ar));
       }
     }
Ok, attach the patch, and ask for review from mconnor@steelgryphon.com.
Severity: normal → trivial
Status: RESOLVED → REOPENED
OS: Windows XP → All
Hardware: PC → All
Resolution: INVALID → ---
Version: unspecified → Trunk
Assignee: firefox → moz_bugzilla
Status: REOPENED → NEW
Priority: -- → P5
Target Milestone: --- → Firefox1.1
Attached patch patchSplinter Review
Not sure who should sr this one so any info in this regard would be welcome.
Thanks.
Attachment #175664 - Flags: review?(mconnor)
No SR is needed in /browser.
Status: NEW → ASSIGNED
Attachment #175664 - Flags: review?(mconnor) → review+
Whiteboard: [checkin needed]
Checking in nsBrowserContentHandler.js;
/cvsroot/mozilla/browser/components/nsBrowserContentHandler.js,v  <-- 
nsBrowserContentHandler.js
new revision: 1.6; previous revision: 1.5
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: