Closed Bug 339030 Opened 18 years ago Closed 17 years ago

Remove unused methods from safe browsing code

Categories

(Toolkit :: Safe Browsing, defect)

defect
Not set
normal

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)
Agreed. Perhaps this can be a tracking bug and separate bugs should be filed for each of these.
(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
not a blocker, but should happen by b1/b2
Flags: blocking-firefox2? → blocking-firefox2-
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
Depends on: 382618
Depends on: 382619
Depends on: 382620
Depends on: 382621
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.
No longer depends on: 382618, 382619, 382620, 382621
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 beta1
Sorry for the bugspam.
Depends on: 382618, 382619, 382620, 382621
Blocks: 382635
No longer depends on: 382619
Depends on: 382816
No longer blocks: 382635
Depends on: 382635
Keywords: meta
OS: Windows XP → All
Hardware: PC → All
Depends on: 382991
Depends on: 382993
Depends on: 382996
Depends on: 383001
Depends on: 383217
Flags: blocking-firefox3? → blocking-firefox3-
Whiteboard: [wanted-firefox3]
No longer depends on: 382635
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
Status: NEW → RESOLVED
Closed: 17 years ago
Depends on: 338830
Resolution: --- → FIXED
Flags: wanted-firefox3+
Whiteboard: [wanted-firefox3]
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.