[Webkit-unassigned] [Bug 28677] Allow excluding certain plugins from loading

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 25 10:32:25 PDT 2009


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


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #38475|review?                     |review-
               Flag|                            |




--- Comment #1 from Eric Seidel <eric at webkit.org>  2009-08-25 10:32:24 PDT ---
(From update of attachment 38475)
I would probably have broken:
   if (!m_client || m_client->shouldLoadPluginAtPath(*it)) {
 121             RefPtr<PluginPackage> package =
PluginPackage::createPackage(*it, lastModified);
 122             if (package) {
 123                 if ((!m_client ||
m_client->shouldLoadPluginPackage(package)) && add(package))
 124                     pluginSetChanged = true;
 125                 package.release();
 126             }
 127         }
out into a little function to make early return possible (for when !package)
for instance.  You'd have to pass the Client* and the path, and likey return a
PassRefPtr<PluginPackage>  It would get rid of the need for explicit release
though.

Probably would look something like this:

RefPtr<PluginPackage> package = loadPluginAtPath(*it, m_client);
if (addPluginPackage(package.release(), this))
    pluginSetChanged = true;

Actually, I'm not sure that's cleaner since you have to pass "this" in oder to
get access to "add()"

Anyway, you can re-work that function if you'd like, or it's OK as is.  But I'm
going to r- this for the wrong copyright here:

+ * Copyright (C) 2007 Apple Inc. All rights reserved.  Should show your
copyright

Otherwise this looks fine to me.  I'll CC the plugin experts in case they have
comment.

-- 
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