Bug 131341

Summary: Web Replay: memoize plugin data for navigator.mimeTypes and navigator.plugins
Product: WebKit Reporter: Brian Burg <burg>
Component: BindingsAssignee: Brian Burg <burg>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, joepeck, kling, sam, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch
none
reordered encode/decode methods none

Brian Burg
Reported 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.
Attachments
the patch (22.67 KB, patch)
2014-04-09 18:57 PDT, Brian Burg
no flags
reordered encode/decode methods (22.96 KB, patch)
2014-04-10 12:24 PDT, Brian Burg
no flags
Brian Burg
Comment 1 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.
Brian Burg
Comment 2 2014-04-09 18:57:56 PDT
Created attachment 229012 [details] the patch
WebKit Commit Bot
Comment 3 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.
Brian Burg
Comment 4 2014-04-10 11:47:19 PDT
Before landing I'm going to fix alphabetical sorting in SerializationMethods
Brian Burg
Comment 5 2014-04-10 12:24:51 PDT
Created attachment 229070 [details] reordered encode/decode methods
WebKit Commit Bot
Comment 6 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.
WebKit Commit Bot
Comment 7 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>
WebKit Commit Bot
Comment 8 2014-04-10 13:53:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.