RESOLVED FIXED 49198
NPClass::construct and NPClass::invokeDefault never called with out-of-process plug-ins in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=49198
Summary NPClass::construct and NPClass::invokeDefault never called with out-of-proces...
Anders Carlsson
Reported 2010-11-08 12:07:31 PST
NPClass::construct and NPClass::invokeDefault never called with out-of-process plug-ins in WebKit2
Attachments
Patch (13.41 KB, patch)
2010-11-08 12:09 PST, Anders Carlsson
aroben: review+
Anders Carlsson
Comment 1 2010-11-08 12:09:17 PST
WebKit Review Bot
Comment 2 2010-11-08 12:12:22 PST
Attachment 73264 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac-snowleopard/Skipped', u'LayoutTests/platform/mac-wk2/Skipped', u'WebKit2/ChangeLog', u'WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp', u'WebKit2/Shared/Plugins/NPObjectMessageReceiver.h', u'WebKit2/Shared/Plugins/NPObjectMessageReceiver.messages.in', u'WebKit2/Shared/Plugins/NPObjectProxy.cpp', u'WebKit2/Shared/Plugins/NPObjectProxy.h']" exit_code: 1 WebKit2/Shared/Plugins/NPObjectProxy.cpp:303: NPObjectProxy::NP_InvokeDefault is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] WebKit2/Shared/Plugins/NPObjectProxy.cpp:333: NPObjectProxy::NP_Construct is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Roben (:aroben)
Comment 3 2010-11-08 12:12:54 PST
Comment on attachment 73264 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=73264&action=review > WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp:108 > + Vector<NPVariant> arguments; > + for (size_t i = 0; i < argumentsData.size(); ++i) > + arguments.append(m_npRemoteObjectMap->npVariantDataToNPVariant(argumentsData[i])); Maybe it would be better to give arguments an initial size? > WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp:113 > + if (!returnValue) > + return; Whoops! You just leaked the NPVariants in arguments! > WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp:215 > + Vector<NPVariant> arguments; > + for (size_t i = 0; i < argumentsData.size(); ++i) > + arguments.append(m_npRemoteObjectMap->npVariantDataToNPVariant(argumentsData[i])); > + > + NPVariant result; > + returnValue = m_npObject->_class->construct(m_npObject, arguments.data(), arguments.size(), &result); > + if (!returnValue) > + return; Same comments here.
Anders Carlsson
Comment 4 2010-11-08 12:35:33 PST
Note You need to log in before you can comment on or make changes to this bug.