Closed
Bug 284647
Opened 20 years ago
Closed 19 years ago
Javascript strict warnings in browser.js
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: florian, Assigned: Gavin)
Details
Attachments
(2 files, 4 obsolete files)
3.07 KB,
text/plain
|
Details | |
18.23 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050302 Firefox/1.0+ Source File: chrome://browser/content/browser.js 16 warnings in this file.
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Comment 2•20 years ago
|
||
Reporter | ||
Updated•20 years ago
|
Attachment #176163 -
Flags: review?(mconnor)
Comment 3•20 years ago
|
||
Comment on attachment 176163 [details] [diff] [review] patch can you attach a patch using diff -up8 please? There's a reason we request that as a default, context is good.
Attachment #176163 -
Flags: review?(mconnor) → review-
Reporter | ||
Comment 4•20 years ago
|
||
Attachment #176249 -
Flags: review?(mconnor)
Comment 5•20 years ago
|
||
Comment on attachment 176249 [details] [diff] [review] same patch with more context >@@ -2903,23 +2903,23 @@ var FullScreen = > if (toolboxMode != "text") { > toolbox.setAttribute("saved-mode", toolboxMode); > toolbox.setAttribute("saved-iconsize", toolboxIconSize); > toolbox.setAttribute("mode", "icons"); > toolbox.setAttribute("iconsize", "small"); > } > else { > if (toolbox.hasAttribute("saved-mode")) { >- var savedMode = toolbox.getAttribute("saved-mode"); >+ savedMode = toolbox.getAttribute("saved-mode"); > toolbox.setAttribute("mode", savedMode); > toolbox.removeAttribute("saved-mode"); > } > > if (toolbox.hasAttribute("saved-iconsize")) { >- var savedIconSize = toolbox.getAttribute("saved-iconsize"); >+ savedIconSize = toolbox.getAttribute("saved-iconsize"); > toolbox.setAttribute("iconsize", savedIconSize); > toolbox.removeAttribute("saved-iconsize"); > } > } > } > } > }; > >@@ -3372,16 +3372,17 @@ nsBrowserAccess.prototype = > return this; > throw Components.results.NS_NOINTERFACE; > }, > > openURI : function(aURI, aOpener, aWhere, aContext) > { > var newWindow = null; > var referrer = null; >+ var location = null; > if (aWhere == nsCI.nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW) { > switch (aContext) { > case nsCI.nsIBrowserDOMWindow.OPEN_EXTERNAL : > aWhere = gPrefService.getIntPref("browser.link.open_external"); > break; > default : // OPEN_NEW or an illegal value > aWhere = gPrefService.getIntPref("browser.link.open_newwindow"); > } >@@ -3395,39 +3396,37 @@ nsBrowserAccess.prototype = > var newTab = gBrowser.addTab("about:blank"); > if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground")) > gBrowser.selectedTab = newTab; > newWindow = gBrowser.getBrowserForTab(newTab).docShell > .QueryInterface(nsCI.nsIInterfaceRequestor) > .getInterface(nsCI.nsIDOMWindow); > try { > if (aOpener) { >- var location = Components.lookupMethod(aOpener,"location") >+ location = Components.lookupMethod(aOpener,"location") > .call(aOpener); align the periods, if you move the line, you have to realign the code. >- var referrer = >- Components.classes["@mozilla.org/network/io-service;1"] >+ referrer = Components.classes["@mozilla.org/network/io-service;1"] > .getService(Components.interfaces.nsIIOService) > .newURI(location, null, null); same here > newWindow.QueryInterface(nsCI.nsIInterfaceRequestor) > .getInterface(nsCI.nsIWebNavigation) > .loadURI(url, nsCI.nsIWebNavigation.LOAD_FLAGS_NONE, > referrer, null, null); > } catch(e) { > } > break; > default : // OPEN_CURRENTWINDOW or an illegal value > try { > if (aOpener) { > newWindow = Components.lookupMethod(aOpener,"top") > .call(aOpener); >- var location = Components.lookupMethod(aOpener,"location") >+ location = Components.lookupMethod(aOpener,"location") > .call(aOpener); >- var referrer = >- Components.classes["@mozilla.org/network/io-service;1"] >+ referrer = Components.classes["@mozilla.org/network/io-service;1"] > .getService(Components.interfaces.nsIIOService) > .newURI(location, null, null); > these two as well. looks good otherwise, r=me once I see those changes.
Attachment #176249 -
Flags: review?(mconnor) → review-
Reporter | ||
Comment 6•20 years ago
|
||
Attachment #176163 -
Attachment is obsolete: true
Attachment #176249 -
Attachment is obsolete: true
Attachment #176283 -
Flags: review?(mconnor)
Reporter | ||
Updated•20 years ago
|
Attachment #176283 -
Attachment description: patch-2 → patch-2 (wrong diff)
Attachment #176283 -
Attachment is obsolete: true
Attachment #176283 -
Flags: review?(mconnor)
Reporter | ||
Comment 7•20 years ago
|
||
The previous diff was wrong. sorry about that. I realigned the periods.
Attachment #176287 -
Flags: review?(mconnor)
Assignee | ||
Comment 8•19 years ago
|
||
Attachment #176287 -
Attachment is obsolete: true
Attachment #178739 -
Flags: review?(mconnor)
Assignee | ||
Updated•19 years ago
|
Attachment #176287 -
Flags: review?(mconnor)
Updated•19 years ago
|
Attachment #178739 -
Flags: review?(mconnor) → review+
Assignee | ||
Updated•19 years ago
|
Whiteboard: [checkin needed]
Comment 9•19 years ago
|
||
Checking in base/content/browser.js; /cvsroot/mozilla/browser/base/content/browser.js,v <-- browser.js new revision: 1.406; previous revision: 1.405 done
Assignee: firefox → gavin.sharp
Whiteboard: [checkin needed]
Updated•19 years ago
|
Attachment #178739 -
Attachment description: Patch → [checked in] Patch
You need to log in
before you can comment on or make changes to this bug.
Description
•