12013-10-07 Darin Adler <darin@apple.com>
2
3 Change NetscapePluginInstanceProxy::m_replies to use unique_ptr instead of deleteAllValues
4 https://bugs.webkit.org/show_bug.cgi?id=122492
5
6 Reviewed by NOBODY (OOPS!).
7
8 * Plugins/Hosted/NetscapePluginHostManager.mm:
9 (WebKit::NetscapePluginHostManager::instantiatePlugin): Use auto so this works with
10 unique_ptr instead of auto_ptr.
11 * Plugins/Hosted/NetscapePluginHostProxy.mm:
12 (WKPCGetScriptableNPObjectReply): Use make_unique instead of using new directly.
13 (WKPCBooleanReply): Ditto.
14 (WKPCBooleanAndDataReply): Ditto.
15 (WKPCInstantiatePluginReply): Ditto.
16 * Plugins/Hosted/NetscapePluginInstanceProxy.h: Changed m_replies to map to unique_ptr
17 instead of to a raw pointer.
18 (WebKit::NetscapePluginInstanceProxy::setCurrentReply): Changed to take a unique_ptr
19 instead of a raw pointer since this takes ownership of the pointer.
20 (WebKit::NetscapePluginInstanceProxy::waitForReply): Changed to return a unique_ptr
21 instead of a auto_ptr because that's better. Use unique_ptr inside the function
22 too to avoid the need for an explicit delete.
23 * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
24 (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): Removed the call to
25 deleteAllValues.
26 (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Removed unneeded initialization
27 of a local variable that was already set in all code paths.
28 (WebKit::NetscapePluginInstanceProxy::wheelEvent): Use auto so this works with unique_ptr
29 instead of auto_ptr.
30 (WebKit::NetscapePluginInstanceProxy::print): Ditto.
31 (WebKit::NetscapePluginInstanceProxy::snapshot): Ditto. Ditto.
32 (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): Changed to return
33 a unique_ptr. Also removed an unneeded assertion.
34 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Use auto so this works
35 with unique_ptr instead of auto_ptr.
36
37 * Plugins/Hosted/ProxyInstance.h: Changed return type of waitForReply to unique_ptr.
38
39 * Plugins/Hosted/ProxyInstance.mm:
40 (WebKit::ProxyInstance::invoke): Use auto so this works with unique_ptr instead of auto_ptr.
41 (WebKit::ProxyInstance::supportsInvokeDefaultMethod): Ditto.
42 (WebKit::ProxyInstance::supportsConstruct): Ditto.
43 (WebKit::ProxyInstance::getPropertyNames): Ditto.
44 (WebKit::ProxyInstance::methodNamed): Ditto.
45 (WebKit::ProxyInstance::fieldNamed): Ditto.
46 (WebKit::ProxyInstance::fieldValue): Ditto.
47 (WebKit::ProxyInstance::setFieldValue): Ditto.
48