Closed Bug 445831 Opened 16 years ago Closed 15 years ago

/suite/.../contentAreaUtils.js: replace getStringBundle() by a <stringbundle>

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0b2

People

(Reporter: sgautherie, Assigned: sgautherie)

References

()

Details

Attachments

(1 file, 2 obsolete files)

Cache the bundle, as this function can get called multiple times, and (now) from various places.

For example, I'm starting to use it for bug 445387.

{{
/toolkit/content/contentAreaUtils.js
/suite/common/contentAreaUtils.js
}}
Attached patch (Av1-SM) <contentAreaUtils.js> (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.2pre) Gecko/2008071502 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #330084 - Flags: superreview?(jag)
Attachment #330084 - Flags: review?(jag)
Bug 445807 comment 15:
{{
neil@parkwaycc.co.uk   2008-08-13 16:16:11 PDT

Hmm, I just noticed that although this stops using strres.js it simply calls
the stringbundle service directly although the <stringbundle> element has a
neater API (e.g. don't need to pass the array length when formatting a string).
}}

I'll see about using a <stringbundle> instead...
helpwanted, as I don't know when I'll get back to this.
Blocks: 484616
Depends on: 475283
Keywords: helpwanted
Whiteboard: [ToDo: comment 2]
Attachment #330084 - Flags: superreview?(jag)
Comment on attachment 330084 [details] [diff] [review]
(Av1-SM) <contentAreaUtils.js>


Ping for review.
Attached patch (Av1a-SM) Cache the bundle (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090802 SeaMonkey/2.1a1pre] (home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/3ae688630837
 +http://hg.mozilla.org/comm-central/rev/87e1c230dc9c)

This should do for now, until I get a chance to look at comment 2.
Attachment #330084 - Attachment is obsolete: true
Attachment #392261 - Flags: review?(neil)
Attachment #330084 - Flags: review?(jag)
I don't think it's worth it as changing to a <xul:stringbundle> will mean having to rewrite the function again.
Blocks: 445387, 475283
Component: General → UI Design
No longer depends on: 475283
Keywords: helpwanted
Product: Core → SeaMonkey
QA Contact: general → ui-design
Summary: Optimize <contentAreaUtils.js> |getStringBundle()| → /suite/.../contentAreaUtils.js: replace getStringBundle() by a <stringbundle>
Whiteboard: [ToDo: comment 2]
Target Milestone: mozilla1.9.1a1 → seamonkey2.0b2
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090802 SeaMonkey/2.1a1pre] (home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/3ae688630837
 +http://hg.mozilla.org/comm-central/rev/87e1c230dc9c)

After patches from bug 445387 and bug 445807,
do the full thing, per comment 2.
Attachment #392261 - Attachment is obsolete: true
Attachment #392482 - Flags: review?(neil)
Attachment #392261 - Flags: review?(neil)
Attachment #392482 - Flags: review?(neil) → review+
Comment on attachment 392482 [details] [diff] [review]
(Bv1) Just replace it
[Checkin: Comment 8]


http://hg.mozilla.org/comm-central/rev/ab7dadb4781a
Attachment #392482 - Attachment description: (Bv1) Just replace it → (Bv1) Just replace it [Checkin: Comment 8]
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Depends on: 520447
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: