Closed Bug 450174 Opened 16 years ago Closed 16 years ago

Remove static string from nsDOMOfflineResourceList.cpp

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dcamp, Assigned: dcamp)

References

Details

Attachments

(1 file)

As mentioned in bug 442806, the use of a static nsCAutoString could lead to a shutdown leak if we ever exceed an 80-character cached manifest.
Flags: blocking1.9.1?
Bug 442806 comment 8: {{ Boris Zbarsky (todo: 200+ items) [gone 8/9--8/17] 2008-08-07 19:56:55 PDT >+static nsCAutoString gCachedManifestSpec; So... generally this is bad: it'll show up as a leak any time the string value is longer than 80 chars or whatever we use now. Followup bug to not us a static object here? }} It should be 64 (not 80). *** IIRC, it was said that |static ns*String| (other than *Auto*) is even guaranteed to leak. So the actual issue may be much wider than nsDOMOfflineResourceList.cpp only.
Depends on: 52352
Version: unspecified → Trunk
(In reply to comment #1) > IIRC, it was said that |static ns*String| (other than *Auto*) is even > guaranteed to leak. > So the actual issue may be much wider than nsDOMOfflineResourceList.cpp only. I filed bug 451497 about finding out these issues by static analysis tool(s).
Attachment #335407 - Flags: superreview?(jst)
Attachment #335407 - Flags: review?(jst)
Comment on attachment 335407 [details] [diff] [review] make cached keys a member Changes to the tests in bug 442806 expose this leak, so this should be fixed before we land that.
Attachment #335407 - Flags: review?(bzbarsky)
Blocks: 52352, 442806
No longer depends on: 52352
Attachment #335407 - Flags: review?(bzbarsky) → review+
Attachment #335407 - Flags: superreview?(jst)
Attachment #335407 - Flags: superreview?(bzbarsky)
Attachment #335407 - Flags: review?(jst)
Attachment #335407 - Flags: superreview?(bzbarsky) → superreview+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: blocking1.9.1?
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: