Closed
Bug 381379
Opened 17 years ago
Closed 17 years ago
remove G_Base64
Categories
(Toolkit :: Safe Browsing, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: sayrer, Assigned: zeniko)
References
Details
Attachments
(1 file, 1 obsolete file)
We shouldn't need this anymore, now that atob and btoa are available to components. There are a few functions left over, but they can be replaced by array comprehensions. arrayifyString becomes [s.charCodeAt(i) for (i in s)].
Reporter | ||
Comment 2•17 years ago
|
||
zeniko, if you want this bug, feel free to take it
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #0) > arrayifyString becomes [s.charCodeAt(i) for (i in s)]. Unfortunately that doesn't work if String.prototype has been extended (which we should expect and effectively is the case for url-classifier). What works instead is Array.map(s, function(c) c.charCodeAt(0))
Comment 4•17 years ago
|
||
It'd be a good idea to convert the existing tests for the G_Base64 component to mochitests for the native atob/btoa functions (in a new bug).
Comment 5•17 years ago
|
||
Patch to commit. zeniko, have you been testing these patches? This is the second patch with syntax errors and at least one other patch threw runtime errors.
Attachment #267064 -
Attachment is obsolete: true
Attachment #267064 -
Flags: review?(tony)
Comment 6•17 years ago
|
||
on trunk Checking in browser/components/safebrowsing/content/application.js; /cvsroot/mozilla/browser/components/safebrowsing/content/application.js,v <-- application.js new revision: 1.10; previous revision: 1.9 done Checking in toolkit/components/url-classifier/content/enchash-decrypter.js; /cvsroot/mozilla/toolkit/components/url-classifier/content/enchash-decrypter.js,v <-- enchash-decrypter.js new revision: 1.15; previous revision: 1.14 done Checking in toolkit/components/url-classifier/content/url-crypto-key-manager.js; /cvsroot/mozilla/toolkit/components/url-classifier/content/url-crypto-key-manager.js,v <-- url-crypto-key-manager.js new revision: 1.12; previous revision: 1.11 done Checking in toolkit/components/url-classifier/content/url-crypto.js; /cvsroot/mozilla/toolkit/components/url-classifier/content/url-crypto.js,v <-- url-crypto.js new revision: 1.6; previous revision: 1.5 done Removing toolkit/components/url-classifier/content/moz/base64.js; /cvsroot/mozilla/toolkit/components/url-classifier/content/moz/base64.js,v <-- base64.js new revision: delete; previous revision: 1.3 done Checking in toolkit/components/url-classifier/content/moz/cryptohasher.js; /cvsroot/mozilla/toolkit/components/url-classifier/content/moz/cryptohasher.js,v <-- cryptohasher.js new revision: 1.7; previous revision: 1.6 done Checking in toolkit/components/url-classifier/src/nsUrlClassifierLib.js; /cvsroot/mozilla/toolkit/components/url-classifier/src/nsUrlClassifierLib.js,v <-- nsUrlClassifierLib.js new revision: 1.8; previous revision: 1.7 done Checking in toolkit/components/url-classifier/src/nsUrlClassifierTable.js; /cvsroot/mozilla/toolkit/components/url-classifier/src/nsUrlClassifierTable.js,v <-- nsUrlClassifierTable.js new revision: 1.7; previous revision: 1.6 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 7•17 years ago
|
||
Bug 383261 filed about porting unittests.
Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #5) > have you been testing these patches? I'm testing the functional changes as far as possible. Since I haven't figured out yet how the whole fits together, there might be some code paths I've been missing. Sorry for those. What was wrong with |function(c) c.charCodeAt(0)| though? I hope you're not referring to that - you'd just need a build with bug 381113 being fixed for testing (i.e. a Gecko 1.9a6pre one).
Comment 9•17 years ago
|
||
You're right, this works on trunk builds. I didn't test with enough context.
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•