Closed
Bug 1381410
Opened 8 years ago
Closed 8 years ago
Add missing monitor enter in nsStringBundle::Format*()
Categories
(Core :: Internationalization, enhancement)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(5 files)
4.21 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
3.27 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
2.11 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
3.36 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
4.20 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
nsStringBundle::Get*() enter a monitor, but nsStringBundle::Format*() do not.
Assignee | ||
Comment 1•8 years ago
|
||
nsStringBundle has two public methods GetStringFrom{ID,Name}() and two
very similar helper methods with the same name. It's easy to get confused
between the two -- indeed, it may be the reason for the data race that this bug
is about -- so this patch renames the helper functions by adding a "Helper"
suffix.
Attachment #8886955 -
Flags: review?(VYV03354)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
GetStringFromIDHelper() is very similar to GetSringFromNameHelper(). This patch
removes the former, and changes GetStringFromID() to call GetStringFromName(),
similar to how FormatStringFromID() calls FormatStringFromName().
Attachment #8886956 -
Flags: review?(VYV03354)
Assignee | ||
Comment 3•8 years ago
|
||
Similar to the previous patch, this patch changes GetStringFromID() to call
GetStringFromName(), but this time in nsExtensibleStringBundle.
Attachment #8886957 -
Flags: review?(VYV03354)
Assignee | ||
Comment 4•8 years ago
|
||
GetStringFromName() enters mReentrantMonitor(), and the other Get*() functions
go through GetStringFromName(). But none of the Format*() functions enter the
monitor.
This patch moves some repeated code from GetStringFromName() and
FormatStringFromName() into GetStringFromNameHelper(), including the monitor
entry. All the Get*() and Format*() functions now use
GetStringFromNameHelper(), which means they now all enter the monitor.
Attachment #8886958 -
Flags: review?(VYV03354)
Assignee | ||
Comment 5•8 years ago
|
||
This patch moves the destructor after the constructor, puts the
NS_IMPL_ISUPPORTS line in a more sensible spot, and moves the Get*() functions
before the Format*() functions in order to match the order in
nsIStringBundle.idl.
Attachment #8886959 -
Flags: review?(VYV03354)
Comment 6•8 years ago
|
||
Comment on attachment 8886955 [details] [diff] [review]
(part 1) - Rename two protected methods in nsStringBundle
Nice cleanup.
Attachment #8886955 -
Flags: review?(VYV03354) → review+
Updated•8 years ago
|
Attachment #8886956 -
Flags: review?(VYV03354) → review+
Updated•8 years ago
|
Attachment #8886957 -
Flags: review?(VYV03354) → review+
Updated•8 years ago
|
Attachment #8886958 -
Flags: review?(VYV03354) → review+
Updated•8 years ago
|
Attachment #8886959 -
Flags: review?(VYV03354) → review+
Assignee | ||
Comment 7•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/048682b66e04eb7137241c9914f250f9a979a15a
Bug 1381410 (part 1) - Rename two protected methods in nsStringBundle. r=emk.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c200c517cd5b0b3005f914654751c35ef66a592f
Bug 1381410 (part 2) - Remove nsStringBundle::GetStringFromIDHelper(). r=emk.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c528ff7eb1174dfc33d3d30b9da4b176fbacb5ff
Bug 1381410 (part 3) - Simplify nsExtensibleStringBundle::GetStringFromID(). r=emk.
https://hg.mozilla.org/integration/mozilla-inbound/rev/3756382ef3b77ecfbd89d142c21e0ed202dfbf6b
Bug 1381410 (part 4) - Add missing monitor enter in nsStringBundle::Format*() functions. r=emk.
https://hg.mozilla.org/integration/mozilla-inbound/rev/8cd4bd9ec8ae107a4c6a178c53aae56668804fbe
Bug 1381410 (part 5) - Reorder nsStringBundle. r=emk.
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/048682b66e04
https://hg.mozilla.org/mozilla-central/rev/c200c517cd5b
https://hg.mozilla.org/mozilla-central/rev/c528ff7eb117
https://hg.mozilla.org/mozilla-central/rev/3756382ef3b7
https://hg.mozilla.org/mozilla-central/rev/8cd4bd9ec8ae
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•