Closed Bug 554178 Opened 10 years ago Closed 5 years ago

[OOPP] Cached user agent code is broken

Categories

(Core :: Plug-ins, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: bent.mozilla, Assigned: cpeterson)

Details

Attachments

(1 file)

It's not currently caching anywhere and I think the idea was that it should.
It ain't broken if we never implemented it.

I remember not thinking this was worthwhile, because technically we need to invalidate the cache when one of the myriad of prefs controlling the user agent changes.  Do you have a profile or plugin log that suggests it's now worth the effort?
Summary: [OOPP] Cached user agent code is broken → [OOPP] Investigate caching the user agent
Er... Then why do we save it in mUserAgent?
Oh sorry, didn't notice/know that.  Looks like we picked that up in
http://hg.mozilla.org/mozilla-central/rev/ee38cc175494.
Summary: [OOPP] Investigate caching the user agent → [OOPP] Cached user agent code is broken
We save it in mUserAgent because we need to hand the plugin a char*, but we own it. This is not technically a cached value because we re-request it each time.
And I don't think we should bother caching it unless it shows up in painting or some hotspot.
Remove unused member variable PluginModuleChild::mUserAgent. I stumbled upon this unused member variable and this bug when removing some other dead plugin code.
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Attachment #8622919 - Flags: review?(jmathies)
Comment on attachment 8622919 [details] [diff] [review]
remove-unused-mUserAgent.patch

Strange - looks abandoned

https://dxr.mozilla.org/mozilla-central/search?q=mUserAgent&case=true&redirect=true
Attachment #8622919 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/0757793dc988
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.