Closed Bug 453820 Opened 16 years ago Closed 16 years ago

Audit front-end code for unnecessary rdf QIs

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0a3

People

(Reporter: jminta, Assigned: jminta)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch v1 (obsolete) (deleted) — Splinter Review
There are a number of spots in front-end code where we take folders and QI them to nsIRDFResources unnecessarily. Most of the time this is to access the .Value property, which as I understand it, is identical to nsIMsgFolder's .URI property. This patch converts these.
Attachment #337048 - Flags: review?(mkmelin+mozilla)
Attached patch patch v2 (obsolete) (deleted) — Splinter Review
Sorry, still getting back into the swing of things. jcranmer reminded me that to fix many areas, you have to do double the work.
Attachment #337048 - Attachment is obsolete: true
Attachment #337052 - Flags: review?(mkmelin+mozilla)
Attachment #337048 - Flags: review?(mkmelin+mozilla)
Attachment #337052 - Flags: review?(mkmelin+mozilla) → review+
Comment on attachment 337052 [details] [diff] [review] patch v2 >- var re = new RegExp("^" + folderURI + "$|^" + folderURI + "\||\|" + folderURI + "$|\|" + folderURI +"\|"); Please break this to two lines. >+ var msgDatabase = currentLoadedFolder.getMsgDatabase(msgWindow); >+ var dbFolderInfo = msgDatabase.dBFolderInfo; >+ var srchFolderUri = dbFolderInfo.getCharProperty("searchFolderUri"); >+ var re = new RegExp("^" + folderURI + "$|^" + msgfolder.URI + "\||\|" + msgfolder.URI + "$|\|" + msgfolder.URI +"\|"); Break the line please. >+ var retval = (currentLoadedFolder.URI.match(re)); >+ return retval; > } Why the tmp. >- return false; >+ var currentURI = currentLoadedFolder.URI; >+ return(currentURI == folder.URI); Here too (yes, you're just moving it...) --- Compact folder (at least from the context menu) doesn't work with this patch Error: selectedFolder is not defined Source File: chrome://messenger/content/widgetglue.js Line: 99 ... though that's a trivial fix. r=me for the /mail bits with those fixed
Blocks: TB2SM
Attached patch patch v3 (deleted) — Splinter Review
Nits picked, just need an sr on the identical mailnews/ changes.
Attachment #337052 - Attachment is obsolete: true
Attachment #339088 - Flags: superreview?(bienvenu)
Attachment #339088 - Flags: review+
Attachment #339088 - Flags: superreview?(bienvenu) → superreview+
Pushed "patch v3" as 364:b078dbe584b0
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b1
(In reply to comment #3) > Created an attachment (id=339088) [details] > patch v3 > > Nits picked, just need an sr on the identical mailnews/ changes. Patch seems to be missing the subscribe.js changes for mail/ even though they are there for mailnews/
(In reply to comment #5) > Patch seems to be missing the subscribe.js changes for mail/ even though they > are there for mailnews/ (Later) Done by bug 455947.
Depends on: 455947
Blocks: 657607
No longer blocks: 657607
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: