WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105364
Notify context client of change to table, and allow client to get a copy of it
https://bugs.webkit.org/show_bug.cgi?id=105364
Summary
Notify context client of change to table, and allow client to get a copy of it
Jon Lee
Reported
2012-12-18 16:26:42 PST
When a new origin hash is added, notify the context client of the change. The client can then request from the context a copy of the table for its own record keeping, such as saving to disk.
Attachments
Patch
(8.89 KB, patch)
2012-12-19 00:37 PST
,
Jon Lee
beidson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2012-12-18 16:27:02 PST
<
rdar://problem/12906267
>
Jon Lee
Comment 2
2012-12-19 00:37:55 PST
Created
attachment 180108
[details]
Patch
Brady Eidson
Comment 3
2012-12-19 11:24:36 PST
Comment on
attachment 180108
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180108&action=review
> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:55 > m_context->sendToAllProcesses(Messages::WebProcess::DidAddPlugInAutoStartOrigin(plugInOriginHash)); > + m_context->client().plugInAutoStartOriginHashesChanged(m_context); > }
Is it expected that a client will always call WKContextCopyPlugInAutoStartOriginHashes in response to this client callback? If so, we should just pass the new hashes along with it. And - if so - we might not even need the autoStartOriginsTableCopy accessor at all.
> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:69 > + ImmutableDictionary::MapType map; > + AutoStartTable::const_iterator itEnd = m_autoStartTable.end(); > + for (AutoStartTable::const_iterator it = m_autoStartTable.begin(); it != itEnd; ++it) { > + Vector<RefPtr<APIObject> > hashes;
Just call itEnd "end", please. That's what we do everywhere else.
> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:71 > + HashSet<unsigned>::iterator valueItEnd = it->value.end(); > + for (HashSet<unsigned>::iterator valueIt = it->value.begin(); valueIt != valueItEnd; ++valueIt)
And "valueItEnd" should just be "valueEnd"
Jon Lee
Comment 4
2012-12-19 11:29:47 PST
Comment on
attachment 180108
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180108&action=review
>> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:55 >> } > > Is it expected that a client will always call WKContextCopyPlugInAutoStartOriginHashes in response to this client callback? > > If so, we should just pass the new hashes along with it. > > And - if so - we might not even need the autoStartOriginsTableCopy accessor at all.
No. The client may choose to aggregate these callbacks, and only invoke WKContextCopyPlugInAutoStartOriginHashes periodically.
>> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:69 >> + Vector<RefPtr<APIObject> > hashes; > > Just call itEnd "end", please. That's what we do everywhere else.
Done.
>> Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp:71 >> + for (HashSet<unsigned>::iterator valueIt = it->value.begin(); valueIt != valueItEnd; ++valueIt) > > And "valueItEnd" should just be "valueEnd"
Done.
Brady Eidson
Comment 5
2012-12-19 11:34:13 PST
Comment on
attachment 180108
[details]
Patch r+ assuming Jon made the changes he said he made.
Jon Lee
Comment 6
2012-12-19 12:03:04 PST
Committed
r138185
: <
http://trac.webkit.org/changeset/138185
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug