Closed Bug 337371 Opened 20 years ago Closed 20 years ago

combine url classifier tables into a single component

Categories

(Toolkit :: Safe Browsing, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tony, Assigned: tony)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 2 obsolete files)

There are three url classifier tables, url, domain, and enchash. We're currently loading this as three separate JS components and using the JS subscript loader to load files it depends on. We should use one component to cut back on duplicate file loading and to speed up start up.
Attached patch combine 3 components into 1 (obsolete) — Splinter Review
Combine into a single component with a more moz-like name (nsUrlClassiferTable.js). Move table logic into trtable.js so component only deals with loading. While I'm at it, remove threadqueue.js which we no longer use.
Attachment #221516 - Flags: review?(darin)
Comment on attachment 221516 [details] [diff] [review] combine 3 components into 1 mozilla/toolkit/components/url-classifier/content/trtable.js >+UrlClassifierTableDomain.prototype.exists = function(url, callback) { >+ var urlObj = Cc["@mozilla.org/network/standard-url;1"] >+ .createInstance(Ci.nsIURL); >+ urlObj.spec = url; >+ var host = urlObj.host; >+ var components = host.split("."); It is generally a bad idea to instantiate the Standard URL object directly to parse hostnames like this. Instead, you should use nsIIOService's newURI method. That way, you are sure to use the correct URL parser. r=darin w/ that change
Attachment #221516 - Flags: review?(darin) → review+
Attached patch combine 3 components into 1 (obsolete) — Splinter Review
add in darin's change
Attachment #221516 - Attachment is obsolete: true
forgot to remove thread-queue.js from urlListManager.js
Attachment #221537 - Attachment is obsolete: true
Fixed on trunk. Leaving open so we don't forget to check in on branch. Tony: you should ask for branch approval.
Attachment #221632 - Flags: approval-branch-1.8.1?(darin)
Attachment #221632 - Flags: approval-branch-1.8.1?(darin) → approval-branch-1.8.1+
Fixed on branch.
Status: NEW → RESOLVED
Closed: 20 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: