Bug 44810 - Add UserContent API to WebKit2 InjectedBundle
Summary: Add UserContent API to WebKit2 InjectedBundle
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-08-27 18:49 PDT by Sam Weinig
Modified: 2010-08-27 19:16 PDT (History)
0 users

See Also:


Attachments
Patch (13.69 KB, patch)
2010-08-27 18:53 PDT, Sam Weinig
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2010-08-27 18:49:21 PDT
Add UserContent API to WebKit2 InjectedBundle. In the first pass, I will only add it to the InjectedBundle, but we can consider whether we want to provide a convenient  way of doing much of this from the UIProcess if this turns out to be too cumbersome.
Comment 1 Sam Weinig 2010-08-27 18:53:13 PDT
Created attachment 65802 [details]
Patch
Comment 2 Sam Weinig 2010-08-27 18:58:43 PDT
<rdar://problem/8367587>
Comment 3 mitz 2010-08-27 19:13:39 PDT
Comment on attachment 65802 [details]
Patch

> +static PassOwnPtr<Vector<String> > toStringVector(ImmutableArray* patterns)
> +{
> +    size_t size =  patterns->size();
> +    if (!size)
> +        return 0;
> +
> +    Vector<String>* patternsVector = new Vector<String>;

Reserve initial capacity here…

> +    for (size_t i = 0; i < size; ++i) {
> +        WebString* entry = patterns->at<WebString>(i);
> +        if (entry)
> +            patternsVector->append(entry->string());

…unchecked append here.
Comment 4 Sam Weinig 2010-08-27 19:16:55 PDT
Landed in r66292.