All users were logged out of Bugzilla on October 13th, 2018

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

RESOLVED FIXED in seamonkey2.0b2

Status

--
trivial
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: sgautherie, Assigned: sgautherie)

Tracking

Trunk
seamonkey2.0b2
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

10 years ago
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
}}
(Assignee)

Comment 1

10 years ago
Created attachment 330084 [details] [diff] [review]
(Av1-SM) <contentAreaUtils.js>

[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)
(Assignee)

Comment 2

10 years ago
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...
(Assignee)

Comment 3

10 years ago
helpwanted, as I don't know when I'll get back to this.
Blocks: 484616
Depends on: 475283
Keywords: helpwanted
Whiteboard: [ToDo: comment 2]
(Assignee)

Updated

9 years ago
Attachment #330084 - Flags: superreview?(jag)
(Assignee)

Comment 4

9 years ago
Comment on attachment 330084 [details] [diff] [review]
(Av1-SM) <contentAreaUtils.js>


Ping for review.
(Assignee)

Comment 5

9 years ago
Created attachment 392261 [details] [diff] [review]
(Av1a-SM) Cache the bundle

[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)

Comment 6

9 years ago
I don't think it's worth it as changing to a <xul:stringbundle> will mean having to rewrite the function again.
(Assignee)

Updated

9 years ago
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
(Assignee)

Comment 7

9 years ago
Created attachment 392482 [details] [diff] [review]
(Bv1) Just replace it
[Checkin: Comment 8]

[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)
(Assignee)

Updated

9 years ago

Updated

9 years ago
Attachment #392482 - Flags: review?(neil) → review+
(Assignee)

Comment 8

9 years ago
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]
(Assignee)

Updated

9 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Updated

9 years ago
Depends on: 520447
You need to log in before you can comment on or make changes to this bug.