Last Comment Bug 680528 - Make use of the cached value for user agent in PluginModuleChild
: Make use of the cached value for user agent in PluginModuleChild
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla9
Assigned To: Jim Mathies [:jimm]
:
: Benjamin Smedberg [:bsmedberg]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-19 12:26 PDT by Jim Mathies [:jimm]
Modified: 2011-08-21 11:40 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (692 bytes, patch)
2011-08-19 12:27 PDT, Jim Mathies [:jimm]
bent.mozilla: review-
Details | Diff | Splinter Review
patch (1.23 KB, patch)
2011-08-19 13:05 PDT, Jim Mathies [:jimm]
bent.mozilla: review+
Details | Diff | Splinter Review

Description Jim Mathies [:jimm] 2011-08-19 12:26:36 PDT
Flash makes this call fairly often during startup. Since we currently cache this in a member variable we might as well make use of it. Granted the value could change while the browser is running, but I don't think we should worry about that with plugins instances.
Comment 1 Jim Mathies [:jimm] 2011-08-19 12:27:55 PDT
Created attachment 554509 [details] [diff] [review]
patch
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-08-19 12:49:05 PDT
Comment on attachment 554509 [details] [diff] [review]
patch

I'd prefer to set mUserAgent as a void string in the constructor, then only call if the string remains void (I think you can override the useragent string with anything, even the empty string).
Comment 3 Jim Mathies [:jimm] 2011-08-19 13:05:14 PDT
Created attachment 554517 [details] [diff] [review]
patch

nice catch.
Comment 4 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-08-19 13:10:08 PDT
Comment on attachment 554517 [details] [diff] [review]
patch

Thanks, looks good!
Comment 5 Jim Mathies [:jimm] 2011-08-19 13:30:23 PDT
on inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/008e94e45b29
Comment 6 :Ms2ger (⌚ UTC+1/+2) 2011-08-21 11:40:38 PDT
http://hg.mozilla.org/mozilla-central/rev/008e94e45b29

Note You need to log in before you can comment on or make changes to this bug.