Bug 131341 - Web Replay: memoize plugin data for navigator.mimeTypes and navigator.plugins
Summary: Web Replay: memoize plugin data for navigator.mimeTypes and navigator.plugins
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brian Burg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-07 19:04 PDT by Brian Burg
Modified: 2014-04-10 13:53 PDT (History)
6 users (show)

See Also:


Attachments
the patch (22.67 KB, patch)
2014-04-09 18:57 PDT, Brian Burg
no flags Details | Formatted Diff | Diff
reordered encode/decode methods (22.96 KB, patch)
2014-04-10 12:24 PDT, Brian Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2014-04-07 19:04:27 PDT
It should be pretty straightforward to make a new EncodedValue specialization for PluginData, then memoize inside PluginData where it calls out to the platform-specific implementation of getPluginInfo(). This should only happen once per page and when Page::refreshPlugins blows away cached info.
Comment 1 Brian Burg 2014-04-07 19:09:08 PDT
BTW: this API is being addressed now, because it is used by the google analytics urchin. So, basically every page hits it once, then makes a network request with a URL based on it.
Comment 2 Brian Burg 2014-04-09 18:57:56 PDT
Created attachment 229012 [details]
the patch
Comment 3 WebKit Commit Bot 2014-04-09 18:59:25 PDT
Attachment 229012 [details] did not pass style-queue:


ERROR: Source/WebCore/replay/SerializationMethods.h:103:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/replay/SerializationMethods.cpp:485:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Brian Burg 2014-04-10 11:47:19 PDT
Before landing I'm going to fix alphabetical sorting in SerializationMethods
Comment 5 Brian Burg 2014-04-10 12:24:51 PDT
Created attachment 229070 [details]
reordered encode/decode methods
Comment 6 WebKit Commit Bot 2014-04-10 12:27:30 PDT
Attachment 229070 [details] did not pass style-queue:


ERROR: Source/WebCore/replay/SerializationMethods.h:103:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/replay/SerializationMethods.cpp:456:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 2 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2014-04-10 13:53:03 PDT
Comment on attachment 229070 [details]
reordered encode/decode methods

Clearing flags on attachment: 229070

Committed r167085: <http://trac.webkit.org/changeset/167085>
Comment 8 WebKit Commit Bot 2014-04-10 13:53:07 PDT
All reviewed patches have been landed.  Closing bug.