Commit 9c716837 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2008-10-27 Anders Carlsson <andersca@apple.com>

        Reviewed by Mitz Pettel.
        
        Move code from dealloc and finalize to the WebNetscapePluginStream destructor.
        
        * Plugins/WebBaseNetscapePluginStream.h:
        * Plugins/WebBaseNetscapePluginStream.mm:
        (WebNetscapePluginStream::~WebNetscapePluginStream):
        (-[WebBaseNetscapePluginStream dealloc]):
        (-[WebBaseNetscapePluginStream finalize]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e695a406
2008-10-27 Anders Carlsson <andersca@apple.com>
Reviewed by Mitz Pettel.
Move code from dealloc and finalize to the WebNetscapePluginStream destructor.
* Plugins/WebBaseNetscapePluginStream.h:
* Plugins/WebBaseNetscapePluginStream.mm:
(WebNetscapePluginStream::~WebNetscapePluginStream):
(-[WebBaseNetscapePluginStream dealloc]):
(-[WebBaseNetscapePluginStream finalize]):
2008-10-27 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -59,8 +59,7 @@ public:
{
return adoptRef(new WebNetscapePluginStream(stream, frameLoader));
}
virtual ~WebNetscapePluginStream() { }
virtual ~WebNetscapePluginStream();
NPP plugin() const { return m_plugin; }
void setPlugin(NPP);
......
......@@ -192,25 +192,28 @@ WebNetscapePluginStream::WebNetscapePluginStream(WebBaseNetscapePluginStream *st
return self;
}
- (void)dealloc
WebNetscapePluginStream::~WebNetscapePluginStream()
{
ASSERT(!_impl->m_plugin);
ASSERT(_impl->m_isTerminated);
ASSERT(_impl->m_stream.ndata == nil);
ASSERT(!m_plugin);
ASSERT(m_isTerminated);
ASSERT(m_stream.ndata == nil);
// The stream file should have been deleted, and the path freed, in -_destroyStream
ASSERT(!_impl->m_path);
ASSERT(_impl->m_fileDescriptor == -1);
if (_impl->m_loader)
_impl->m_loader->deref();
[_impl->m_request release];
free((void *)_impl->m_stream.url);
free(_impl->m_headers);
streams().remove(&_impl->m_stream);
ASSERT(!m_path);
ASSERT(m_fileDescriptor == -1);
if (m_loader)
m_loader->deref();
[m_request release];
free((void *)m_stream.url);
free(m_headers);
streams().remove(&m_stream);
}
- (void)dealloc
{
ASSERT(_impl);
[super dealloc];
......@@ -219,21 +222,6 @@ WebNetscapePluginStream::WebNetscapePluginStream(WebBaseNetscapePluginStream *st
- (void)finalize
{
ASSERT_MAIN_THREAD();
ASSERT(_impl->m_isTerminated);
ASSERT(_impl->m_stream.ndata == nil);
// The stream file should have been deleted, and the path freed, in -_destroyStream
ASSERT(!_impl->m_path);
ASSERT(_impl->m_fileDescriptor == -1);
if (_impl->m_loader)
_impl->m_loader->deref();
free((void *)_impl->m_stream.url);
free(_impl->m_headers);
streams().remove(&_impl->m_stream);
ASSERT(_impl);
[super finalize];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment