Closed
Bug 339030
Opened 18 years ago
Closed 17 years ago
Remove unused methods from safe browsing code
Categories
(Toolkit :: Safe Browsing, defect)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
Firefox 3 alpha7
People
(Reporter: zeniko, Unassigned)
References
Details
(Keywords: meta)
(1) There's quite a bunch of methods which are never called and seem to belong to a programming framework which probably shouldn't live in a JS component. E.g. getObjectProps, isEmptyObject, getHashCode, removeHashCode, String.prototype.startsWith and probably most of the rest of lang.js (even the isXXX methods should IMO be replaced with typeof checks in place - which is required for isDef and hardly a difference for the rest).
(2) base64 encoding code already exists in other places and should be reused.
(3) All methods marked as "deprecated" don't really belong into brand new code.
(4) Exhaustive debug code should be #ifdef'd out (might be fixed with bug 338094)
(5) And for nit-lovers: The G_ prefixes can probably be dropped as well (saving minimal space and some reading adaptation needs)
Comment 1•18 years ago
|
||
Agreed. Perhaps this can be a tracking bug and separate bugs should be filed for each of these.
Reporter | ||
Comment 2•18 years ago
|
||
(In reply to comment #1)
> Perhaps this can be a tracking bug and separate bugs should be filed
> for each of these.
As you prefer it - if it just gets fixed. ;)
Flags: blocking-firefox2?
Summary: Remove unused methods → Remove unused methods from safe browsing code
Comment 3•18 years ago
|
||
not a blocker, but should happen by b1/b2
Flags: blocking-firefox2? → blocking-firefox2-
Reporter | ||
Comment 4•17 years ago
|
||
base64 encoding has been made available to JS components through bug 326854 (modulo the need for some .replace action for the websafe variant).
Blocks: 171082
Reporter | ||
Comment 5•17 years ago
|
||
I don't care too much about the G_ prefixes (although they don't really conform to neither toolkit/ nor browser/ coding styles), but would really like to see the rest happening for Beta 1.
Reporter | ||
Comment 6•17 years ago
|
||
Sorry for the bugspam.
Reporter | ||
Updated•17 years ago
|
Updated•17 years ago
|
Flags: blocking-firefox3? → blocking-firefox3-
Whiteboard: [wanted-firefox3]
Reporter | ||
Comment 7•17 years ago
|
||
So, #1 to #4 above have indeed happened. -> FIXED
Due to other code size reduction changes, the effects of this bug can't easily be determined (mainly due to bug 387196), nonetheless the numbers for comparison (file sizes as shipped for Windows):
File 1.8.1.6 1.9a8pre
----------------------------------------------
nsSafebrowsingApplication.js 144k 101k
nsUrlClassifierLib.js 132k 60k
nsUrlClassifierListManager.js 32k 16k
nsUrlClassifierTable.js 37k -
----------------------------------------------
Total file size 345k 177k
Updated•17 years ago
|
Flags: wanted-firefox3+
Whiteboard: [wanted-firefox3]
Assignee | ||
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•