Bug 105447 - Add a function to set the origin hash table
Summary: Add a function to set the origin hash table
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.8
: P2 Normal
Assignee: Jon Lee
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-12-19 10:28 PST by Jon Lee
Modified: 2012-12-19 16:39 PST (History)
5 users (show)

See Also:


Attachments
Patch (8.91 KB, patch)
2012-12-19 12:49 PST, Jon Lee
bweinstein: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2012-12-19 10:28:16 PST
Doing this allows a WK2 client to set the hash table upon initialization.
Comment 1 Radar WebKit Bug Importer 2012-12-19 10:28:37 PST
<rdar://problem/12910985>
Comment 2 Jon Lee 2012-12-19 12:49:27 PST
Created attachment 180210 [details]
Patch
Comment 3 Brian Weinstein 2012-12-19 15:07:54 PST
Comment on attachment 180210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=180210&action=review

> Source/WebKit2/UIProcess/API/C/WKContext.cpp:348
> +        return;

Do we want to clear the list of origin hashes if we pass null for the dictionary? Or will we pass an empty dictionary for that case?
Comment 4 Jon Lee 2012-12-19 16:10:07 PST
(In reply to comment #3)
> (From update of attachment 180210 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=180210&action=review
> 
> > Source/WebKit2/UIProcess/API/C/WKContext.cpp:348
> > +        return;
> 
> Do we want to clear the list of origin hashes if we pass null for the dictionary? Or will we pass an empty dictionary for that case?

The client should pass an empty dictionary to clear the list.
Comment 5 Brian Weinstein 2012-12-19 16:18:10 PST
Comment on attachment 180210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=180210&action=review

> Source/WebKit2/ChangeLog:10
> +        keyed by main frame origin, into the WebContext. That, in turn, notifies all existing web

sets... into the WebContext reads a bit strangely, but not sure what would be better.

> Source/WebKit2/WebProcess/WebProcess.cpp:839
> +        m_plugInAutoStartOrigins.add(hashes[i]);

Is it worth calling didAddPlugInAutoStartOrigin(hashes[i]) here? In case we need to add more to that function.
Comment 6 Jon Lee 2012-12-19 16:33:14 PST
Comment on attachment 180210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=180210&action=review

>> Source/WebKit2/WebProcess/WebProcess.cpp:839
>> +        m_plugInAutoStartOrigins.add(hashes[i]);
> 
> Is it worth calling didAddPlugInAutoStartOrigin(hashes[i]) here? In case we need to add more to that function.

Sure, I can call that instead.
Comment 7 Jon Lee 2012-12-19 16:39:34 PST
Committed r138203: <http://trac.webkit.org/changeset/138203>