Source/WebKit/mac/ChangeLog

 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
1492013-10-07 Sam Weinig <sam@webkit.org>
250
351 CTTE: Use references in and around DragController

Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm

@@PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
268268 _WKPHInstantiatePlugin(hostProxy->port(), requestID, (uint8_t*)[data bytes], [data length], instance->pluginID());
269269 }
270270
271  std::auto_ptr<NetscapePluginInstanceProxy::InstantiatePluginReply> reply = instance->waitForReply<NetscapePluginInstanceProxy::InstantiatePluginReply>(requestID);
272  if (!reply.get() || reply->m_resultCode != KERN_SUCCESS) {
 271 auto reply = instance->waitForReply<NetscapePluginInstanceProxy::InstantiatePluginReply>(requestID);
 272 if (!reply || reply->m_resultCode != KERN_SUCCESS) {
273273 instance->cleanup();
274  return 0;
 274 return nullptr;
275275 }
276276
277277 instance->setRenderContextID(reply->m_renderContextID);

Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm

@@kern_return_t WKPCGetScriptableNPObjectReply(mach_port_t clientPort, uint32_t pl
484484 if (!instanceProxy)
485485 return KERN_FAILURE;
486486
487  instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::GetScriptableNPObjectReply(objectID));
 487 instanceProxy->setCurrentReply(requestID, std::make_unique<NetscapePluginInstanceProxy::GetScriptableNPObjectReply>(objectID));
488488 return KERN_SUCCESS;
489489}
490490

@@kern_return_t WKPCBooleanReply(mach_port_t clientPort, uint32_t pluginID, uint32
498498 if (!instanceProxy)
499499 return KERN_FAILURE;
500500
501  instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::BooleanReply(result));
 501 instanceProxy->setCurrentReply(requestID, std::make_unique<NetscapePluginInstanceProxy::BooleanReply>(result));
502502 return KERN_SUCCESS;
503503}
504504

@@kern_return_t WKPCBooleanAndDataReply(mach_port_t clientPort, uint32_t pluginID,
515515 return KERN_FAILURE;
516516
517517 RetainPtr<CFDataRef> result = adoptCF(CFDataCreate(0, reinterpret_cast<UInt8*>(resultData), resultLength));
518  instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::BooleanAndDataReply(returnValue, result));
 518 instanceProxy->setCurrentReply(requestID, std::make_unique<NetscapePluginInstanceProxy::BooleanAndDataReply>(returnValue, result));
519519
520520 return KERN_SUCCESS;
521521}

@@kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t plugin
530530 if (!instanceProxy)
531531 return KERN_FAILURE;
532532
533  instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::InstantiatePluginReply(result, renderContextID, static_cast<RendererType>(rendererType)));
 533 instanceProxy->setCurrentReply(requestID, std::make_unique<NetscapePluginInstanceProxy::InstantiatePluginReply>(result, renderContextID, static_cast<RendererType>(rendererType)));
534534 return KERN_SUCCESS;
535535}
536536

Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h

@@public:
248248 RetainPtr<CFDataRef> m_result;
249249 };
250250
251  void setCurrentReply(uint32_t requestID, Reply* reply)
 251 void setCurrentReply(uint32_t requestID, std::unique_ptr<Reply> reply)
252252 {
253253 ASSERT(!m_replies.contains(requestID));
254  m_replies.set(requestID, reply);
 254 m_replies.add(requestID, std::move(reply));
255255 }
256256
257257 template <typename T>
258  std::auto_ptr<T> waitForReply(uint32_t requestID)
 258 std::unique_ptr<T> waitForReply(uint32_t requestID)
259259 {
260260 Ref<NetscapePluginInstanceProxy> protect(*this); // Plug-in host may crash while we are waiting for reply, releasing all instances to the instance proxy.
261261
262262 willCallPluginFunction();
263263 m_waitingForReply = true;
264264
265  Reply* reply = processRequestsAndWaitForReply(requestID);
 265 auto reply = processRequestsAndWaitForReply(requestID);
266266 if (reply)
267267 ASSERT(reply->m_type == T::ReplyType);
268268

@@public:
272272 didCallPluginFunction(stopped);
273273 if (stopped) {
274274 // The instance proxy may have been deleted from didCallPluginFunction(), so a null reply needs to be returned.
275  delete static_cast<T*>(reply);
276  return std::auto_ptr<T>();
 275 return nullptr;
277276 }
278277
279  return std::auto_ptr<T>(static_cast<T*>(reply));
 278 return std::unique_ptr<T>(static_cast<T*>(reply.release()));
280279 }
281280
282281 void webFrameDidFinishLoadWithReason(WebFrame*, NPReason);

@@private:
291290 void evaluateJavaScript(PluginRequest*);
292291
293292 void stopAllStreams();
294  Reply* processRequestsAndWaitForReply(uint32_t requestID);
 293 std::unique_ptr<Reply> processRequestsAndWaitForReply(uint32_t requestID);
295294
296295 NetscapePluginHostProxy* m_pluginHostProxy;
297296 WebHostedNetscapePluginView *m_pluginView;

@@private:
309308 RendererType m_rendererType;
310309
311310 bool m_waitingForReply;
312  HashMap<uint32_t, Reply*> m_replies;
 311 HashMap<uint32_t, std::unique_ptr<Reply>> m_replies;
313312
314313 // NPRuntime
315314

Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm

@@inline bool NetscapePluginInstanceProxy::LocalObjectMap::contains(uint32_t objec
122122inline JSC::JSObject* NetscapePluginInstanceProxy::LocalObjectMap::get(uint32_t objectID) const
123123{
124124 if (objectID == HashTraits<uint32_t>::emptyValue() || HashTraits<uint32_t>::isDeletedValue(objectID))
125  return 0;
 125 return nullptr;
126126
127127 return m_idToJSObjectMap.get(objectID).get();
128128}

@@NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy()
258258 ASSERT(!m_pluginHostProxy);
259259
260260 m_pluginID = 0;
261  deleteAllValues(m_replies);
262261
263262#ifndef NDEBUG
264263 netscapePluginInstanceProxyCounter.decrement();

@@void NetscapePluginInstanceProxy::cleanup()
321320 (*it)->invalidate();
322321
323322 m_pluginView = nil;
324  m_manualStream = 0;
 323 m_manualStream = nullptr;
325324}
326325
327326void NetscapePluginInstanceProxy::invalidate()

@@void NetscapePluginInstanceProxy::invalidate()
331330 return;
332331
333332 m_pluginHostProxy->removePluginInstance(this);
334  m_pluginHostProxy = 0;
 333 m_pluginHostProxy = nullptr;
335334}
336335
337336void NetscapePluginInstanceProxy::destroy()

@@void NetscapePluginInstanceProxy::setManualStream(PassRefPtr<HostedNetscapePlugi
369368
370369bool NetscapePluginInstanceProxy::cancelStreamLoad(uint32_t streamID, NPReason reason)
371370{
372  HostedNetscapePluginStream* stream = 0;
 371 HostedNetscapePluginStream* stream;
373372
374373 if (m_manualStream && streamID == 1)
375374 stream = m_manualStream.get();

@@bool NetscapePluginInstanceProxy::cancelStreamLoad(uint32_t streamID, NPReason r
386385void NetscapePluginInstanceProxy::disconnectStream(HostedNetscapePluginStream* stream)
387386{
388387 if (stream == m_manualStream) {
389  m_manualStream = 0;
 388 m_manualStream = nullptr;
390389 return;
391390 }
392391

@@void NetscapePluginInstanceProxy::disconnectStream(HostedNetscapePluginStream* s
396395
397396void NetscapePluginInstanceProxy::pluginHostDied()
398397{
399  m_pluginHostProxy = 0;
 398 m_pluginHostProxy = nullptr;
400399
401400 [m_pluginView pluginHostDied];
402401

@@bool NetscapePluginInstanceProxy::wheelEvent(NSView *pluginView, NSEvent *event)
499498 pluginPoint.x, pluginPoint.y, [event buttonNumber],
500499 [event deltaX], [event deltaY], [event deltaZ]);
501500
502  std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
503  if (!reply.get() || !reply->m_result)
504  return false;
505 
506  return true;
 501 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
 502 return reply && reply->m_result;
507503}
508504
509505void NetscapePluginInstanceProxy::print(CGContextRef context, unsigned width, unsigned height)

@@void NetscapePluginInstanceProxy::print(CGContextRef context, unsigned width, un
511507 uint32_t requestID = nextRequestID();
512508 _WKPHPluginInstancePrint(m_pluginHostProxy->port(), m_pluginID, requestID, width, height);
513509
514  std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
515  if (!reply.get() || !reply->m_returnValue)
 510 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
 511 if (!reply || !reply->m_returnValue)
516512 return;
517513
518514 RetainPtr<CGDataProvider> dataProvider = adoptCF(CGDataProviderCreateWithCFData(reply->m_result.get()));

@@void NetscapePluginInstanceProxy::snapshot(CGContextRef context, unsigned width,
534530 uint32_t requestID = nextRequestID();
535531 _WKPHPluginInstanceSnapshot(m_pluginHostProxy->port(), m_pluginID, requestID, width, height);
536532
537  std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
538  if (!reply.get() || !reply->m_returnValue)
 533 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
 534 if (!reply || !reply->m_returnValue)
539535 return;
540536
541537 RetainPtr<CGDataProvider> dataProvider = adoptCF(CGDataProviderCreateWithCFData(reply->m_result.get()));

@@NPError NetscapePluginInstanceProxy::loadRequest(NSURLRequest *request, const ch
816812 return NPERR_NO_ERROR;
817813}
818814
819 NetscapePluginInstanceProxy::Reply* NetscapePluginInstanceProxy::processRequestsAndWaitForReply(uint32_t requestID)
 815std::unique_ptr<NetscapePluginInstanceProxy::Reply> NetscapePluginInstanceProxy::processRequestsAndWaitForReply(uint32_t requestID)
820816{
821  Reply* reply = 0;
822 
823817 ASSERT(m_pluginHostProxy);
 818
 819 std::unique_ptr<Reply> reply;
 820
824821 while (!(reply = m_replies.take(requestID))) {
825822 if (!m_pluginHostProxy->processRequests())
826  return 0;
 823 return nullptr;
827824
828825 // The host proxy can be destroyed while executing a nested processRequests() call, in which case it's normal
829826 // to get a success result, but be unable to keep looping.
830827 if (!m_pluginHostProxy)
831  return 0;
 828 return nullptr;
832829 }
833 
834  ASSERT(reply);
 830
835831 return reply;
836832}
837 
 833
838834// NPRuntime support
839835bool NetscapePluginInstanceProxy::getWindowNPObject(uint32_t& objectID)
840836{

@@bool NetscapePluginInstanceProxy::forgetBrowserObjectID(uint32_t objectID)
871867
872868bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& script, data_t& resultData, mach_msg_type_number_t& resultLength, bool allowPopups)
873869{
874  resultData = 0;
 870 resultData = nullptr;
875871 resultLength = 0;
876872
877873 if (m_inDestroy)

@@bool NetscapePluginInstanceProxy::evaluate(uint32_t objectID, const String& scri
901897
902898bool NetscapePluginInstanceProxy::invoke(uint32_t objectID, const Identifier& methodName, data_t argumentsData, mach_msg_type_number_t argumentsLength, data_t& resultData, mach_msg_type_number_t& resultLength)
903899{
904  resultData = 0;
 900 resultData = nullptr;
905901 resultLength = 0;
906902
907903 if (m_inDestroy)

@@PassRefPtr<Instance> NetscapePluginInstanceProxy::createBindingsInstance(PassRef
14371433 uint32_t requestID = nextRequestID();
14381434
14391435 if (_WKPHGetScriptableNPObject(m_pluginHostProxy->port(), m_pluginID, requestID) != KERN_SUCCESS)
1440  return 0;
 1436 return nullptr;
14411437
1442  std::auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID);
1443  if (!reply.get())
1444  return 0;
 1438 auto reply = waitForReply<GetScriptableNPObjectReply>(requestID);
 1439 if (!reply)
 1440 return nullptr;
14451441
14461442 if (!reply->m_objectID)
1447  return 0;
 1443 return nullptr;
14481444
14491445 // Since the reply was non-null, "this" is still a valid pointer.
14501446 return ProxyInstance::create(rootObject, this, reply->m_objectID);

Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h

@@private:
8787 JSC::JSValue invoke(JSC::ExecState*, InvokeType, uint64_t identifier, const JSC::ArgList&);
8888
8989 template <typename T>
90  std::auto_ptr<T> waitForReply(uint32_t requestID) const {
91  std::auto_ptr<T> reply = m_instanceProxy->waitForReply<T>(requestID);
 90 std::unique_ptr<T> waitForReply(uint32_t requestID) const
 91 {
 92 auto reply = m_instanceProxy->waitForReply<T>(requestID);
9293
9394 // If the instance proxy was invalidated, just return a null reply.
9495 if (!m_instanceProxy)
95  return std::auto_ptr<T>();
 96 return nullptr;
9697
9798 return reply;
9899 }

Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm

@@JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id
163163 return jsUndefined();
164164 }
165165
166  std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
 166 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
167167 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec);
168168
169169 if (m_instanceProxy) {

@@JSValue ProxyInstance::invoke(JSC::ExecState* exec, InvokeType type, uint64_t id
171171 m_instanceProxy->releaseLocalObject(args.at(i));
172172 }
173173
174  if (!reply.get() || !reply->m_returnValue)
 174 if (!reply || !reply->m_returnValue)
175175 return jsUndefined();
176176
177177 return m_instanceProxy->demarshalValue(exec, (char*)CFDataGetBytePtr(reply->m_result.get()), CFDataGetLength(reply->m_result.get()));

@@bool ProxyInstance::supportsInvokeDefaultMethod() const
242242 m_objectID) != KERN_SUCCESS)
243243 return false;
244244
245  std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
246  if (reply.get() && reply->m_result)
247  return true;
248 
249  return false;
 245 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
 246 return reply && reply->m_result;
250247}
251248
252249JSValue ProxyInstance::invokeDefaultMethod(ExecState* exec)

@@bool ProxyInstance::supportsConstruct() const
266263 m_objectID) != KERN_SUCCESS)
267264 return false;
268265
269  std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
270  if (reply.get() && reply->m_result)
271  return true;
272 
273  return false;
 266 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
 267 return reply && reply->m_result;
274268}
275269
276270JSValue ProxyInstance::invokeConstruct(ExecState* exec, const ArgList& args)

@@void ProxyInstance::getPropertyNames(ExecState* exec, PropertyNameArray& nameArr
320314 if (_WKPHNPObjectEnumerate(m_instanceProxy->hostProxy()->port(), m_instanceProxy->pluginID(), requestID, m_objectID) != KERN_SUCCESS)
321315 return;
322316
323  std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
 317 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
324318 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec);
325  if (!reply.get() || !reply->m_returnValue)
 319 if (!reply || !reply->m_returnValue)
326320 return;
327321
328322 RetainPtr<NSArray*> array = [NSPropertyListSerialization propertyListFromData:(NSData *)reply->m_result.get()

@@Method* ProxyInstance::methodNamed(PropertyName propertyName)
347341{
348342 String name(propertyName.publicName());
349343 if (name.isNull())
350  return 0;
 344 return nullptr;
351345
352346 if (!m_instanceProxy)
353  return 0;
 347 return nullptr;
354348
355349 // If we already have an entry in the map, use it.
356350 auto existingMapEntry = m_methods.find(name.impl());

@@Method* ProxyInstance::methodNamed(PropertyName propertyName)
365359 if (_WKPHNPObjectHasMethod(m_instanceProxy->hostProxy()->port(),
366360 m_instanceProxy->pluginID(), requestID,
367361 m_objectID, methodName) != KERN_SUCCESS)
368  return 0;
 362 return nullptr;
369363
370  std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
371  if (!reply.get())
372  return 0;
 364 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
 365 if (!reply)
 366 return nullptr;
373367
374368 if (!reply->m_result && !m_instanceProxy->hostProxy()->shouldCacheMissingPropertiesAndMethods())
375  return 0;
 369 return nullptr;
376370
377371 // Add a new entry to the map unless an entry was added while we were in waitForReply.
378372 auto mapAddResult = m_methods.add(name.impl(), nullptr);

@@Field* ProxyInstance::fieldNamed(PropertyName propertyName)
386380{
387381 String name(propertyName.publicName());
388382 if (name.isNull())
389  return 0;
 383 return nullptr;
390384
391385 if (!m_instanceProxy)
392  return 0;
 386 return nullptr;
393387
394388 // If we already have an entry in the map, use it.
395389 auto existingMapEntry = m_fields.find(name.impl());

@@Field* ProxyInstance::fieldNamed(PropertyName propertyName)
402396 if (_WKPHNPObjectHasProperty(m_instanceProxy->hostProxy()->port(),
403397 m_instanceProxy->pluginID(), requestID,
404398 m_objectID, identifier) != KERN_SUCCESS)
405  return 0;
 399 return nullptr;
406400
407  std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
408  if (!reply.get())
409  return 0;
 401 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
 402 if (!reply)
 403 return nullptr;
410404
411405 if (!reply->m_result && !m_instanceProxy->hostProxy()->shouldCacheMissingPropertiesAndMethods())
412  return 0;
 406 return nullptr;
413407
414408 // Add a new entry to the map unless an entry was added while we were in waitForReply.
415409 auto mapAddResult = m_fields.add(name.impl(), nullptr);

@@JSC::JSValue ProxyInstance::fieldValue(ExecState* exec, const Field* field) cons
431425 m_objectID, serverIdentifier) != KERN_SUCCESS)
432426 return jsUndefined();
433427
434  std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
 428 auto reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);
435429 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec);
436  if (!reply.get() || !reply->m_returnValue)
 430 if (!reply || !reply->m_returnValue)
437431 return jsUndefined();
438432
439433 return m_instanceProxy->demarshalValue(exec, (char*)CFDataGetBytePtr(reply->m_result.get()), CFDataGetLength(reply->m_result.get()));

@@void ProxyInstance::setFieldValue(ExecState* exec, const Field* field, JSValue v
461455 if (kr != KERN_SUCCESS)
462456 return;
463457
464  std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
 458 waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
465459 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec);
466460}
467461

@@void ProxyInstance::invalidate()
472466 if (NetscapePluginHostProxy* hostProxy = m_instanceProxy->hostProxy())
473467 _WKPHNPObjectRelease(hostProxy->port(),
474468 m_instanceProxy->pluginID(), m_objectID);
475  m_instanceProxy = 0;
 469 m_instanceProxy = nullptr;
476470}
477471
478472} // namespace WebKit