[webkit-reviews] review granted: [Bug 122496] Remove use of deleteAllValues in NPRemoteObjectMap::pluginDestroyed : [Attachment 213668] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 8 00:34:26 PDT 2013


Andreas Kling <akling at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 122496: Remove use of deleteAllValues in NPRemoteObjectMap::pluginDestroyed
https://bugs.webkit.org/show_bug.cgi?id=122496

Attachment 213668: Patch
https://bugs.webkit.org/attachment.cgi?id=213668&action=review

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=213668&action=review


r=me, this is much nicer than the old code.

Thought: Do you think it would be cool to have a function that yanks items
matching a [lambda] predicate out of a collection and returns them in a Vector?


> Source/WebKit2/ChangeLog:9
> +	   (WebKit::NPRemoteObjectMap::registerNPObject): Don't call release
when puttin objects

Typo, putting.

> Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp:200
> +    for (auto it = m_registeredNPObjects.begin(), end =
m_registeredNPObjects.end(); it != end; ++it) {

You can use range-based for in WebKit2.

> Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp:209
> +    for (auto it = m_npObjectProxies.begin(), end = m_npObjectProxies.end();
it != end; ++it) {

Same here.


More information about the webkit-reviews mailing list