[Webkit-unassigned] [Bug 130694] Track plugin in visibility in the plugin process.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 28 14:17:13 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130694


Anders Carlsson <andersca at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #227803|review?                     |review+
               Flag|                            |




--- Comment #9 from Anders Carlsson <andersca at apple.com>  2014-03-28 14:17:31 PST ---
(From update of attachment 227803)
View in context: https://bugs.webkit.org/attachment.cgi?id=227803&action=review

> Source/WebKit2/PluginProcess/WebProcessConnection.cpp:331
> +    bool oldState = m_visiblePluginInstanceIDs.isEmpty();

Can you ASSERT(!m_visiblePluginInstanceIDs.contains(pluginInstanceID))?

> Source/WebKit2/PluginProcess/WebProcessConnection.cpp:346
> +    if (m_visiblePluginInstanceIDs.contains(pluginInstanceID))
> +        m_visiblePluginInstanceIDs.remove(pluginInstanceID);

remove is just a no-op if the set doesn't contain the plug-in instance so there's no need to do a .contains check here.

Can you assert that m_visiblePluginInstanceIDs.contains(pluginInstanceID) always returns true here?

> Source/WebKit2/PluginProcess/WebProcessConnection.h:58
> +    void pluginDidBecomeVisible(unsigned pluginInstanceId);
> +    void pluginDidBecomeHidden(unsigned pluginInstanceId);

Capital d in ID.

> Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm:109
> +    printf("Visibility changed  to %d for plugin %llu from %d\n", isVisible, m_pluginInstanceID, getpid());

Please remove this.

> Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm:111
> +    isVisible ? m_connection->pluginDidBecomeVisible(m_pluginInstanceID) : m_connection->pluginDidBecomeHidden(m_pluginInstanceID);

I think an if statement is cleaner than a ternary operator here.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list