-
jhoneycutt@apple.com authored
Reviewed by Anders. Port r34988 to Mac: don't call NPP_DestroyStream if NPP_NewStream was unsuccessful. * Plugins/WebBaseNetscapePluginStream.h: Added new member, newStreamSuccessful. * Plugins/WebBaseNetscapePluginStream.mm: (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): Initialize new member. (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): If NPP_NewStream is successful, set newStreamSuccessful to YES. (-[WebBaseNetscapePluginStream _destroyStream]): Only call NPP_DestroyStream if newStreamSuccessful is true. Port r34988 to Mac: allow tests to define JavaScript to execute when NPP_DestroyStream or NPP_URLNotify is called. * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp: (NPP_New): Remove initialization that happens in pluginAllocate. Look for new arguments onStreamDestroy and onURLNotify. (NPP_Destroy): Free onStreamDestroy and onURLNotify. (executeScript): Code moved from onStreamLoad. (NPP_NewStream): Call executeScript. (NPP_DestroyStream): Same. (NPP_URLNotify): Same. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
be3a861c