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

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

        Reviewed by Kevin Decker.

        * Plugins/WebBaseNetscapePluginStream.h:
        * Plugins/WebBaseNetscapePluginStream.mm:
        (WebNetscapePluginStream::WebNetscapePluginStream):
        (WebNetscapePluginStream::~WebNetscapePluginStream):
        (WebNetscapePluginStream::start):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3d557520
2008-10-29 Anders Carlsson <andersca@apple.com>
Reviewed by Kevin Decker.
* Plugins/WebBaseNetscapePluginStream.h:
* Plugins/WebBaseNetscapePluginStream.mm:
(WebNetscapePluginStream::WebNetscapePluginStream):
(WebNetscapePluginStream::~WebNetscapePluginStream):
(WebNetscapePluginStream::start):
2008-10-29 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -119,8 +119,8 @@ private:
bool m_newStreamSuccessful;
WebCore::FrameLoader* m_frameLoader;
WebCore::NetscapePlugInStreamLoader* m_loader;
NSURLRequest *m_request;
RefPtr<WebCore::NetscapePlugInStreamLoader> m_loader;
RetainPtr<NSMutableURLRequest> m_request;
NPPluginFuncs *m_pluginFuncs;
void deliverDataTimerFired(WebCore::Timer<WebNetscapePluginStream>* timer);
......
......@@ -109,8 +109,6 @@ WebNetscapePluginStream::WebNetscapePluginStream(FrameLoader* frameLoader)
, m_isTerminated(false)
, m_newStreamSuccessful(false)
, m_frameLoader(frameLoader)
, m_loader(0)
, m_request(0)
, m_pluginFuncs(0)
, m_deliverDataTimer(this, &WebNetscapePluginStream::deliverDataTimerFired)
{
......@@ -130,8 +128,7 @@ WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plug
, m_isTerminated(false)
, m_newStreamSuccessful(false)
, m_frameLoader(0)
, m_loader(0)
, m_request([request mutableCopy])
, m_request(AdoptNS, [request mutableCopy])
, m_pluginFuncs(0)
, m_deliverDataTimer(this, &WebNetscapePluginStream::deliverDataTimerFired)
{
......@@ -150,9 +147,9 @@ WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plug
streams().add(&m_stream, plugin);
if (core([view webFrame])->loader()->shouldHideReferrer([request URL], core([view webFrame])->loader()->outgoingReferrer()))
[(NSMutableURLRequest *)m_request _web_setHTTPReferrer:nil];
[m_request.get() _web_setHTTPReferrer:nil];
m_loader = NetscapePlugInStreamLoader::create(core([view webFrame]), this).releaseRef();
m_loader = NetscapePlugInStreamLoader::create(core([view webFrame]), this);
m_loader->setShouldBufferData(false);
}
......@@ -166,10 +163,6 @@ WebNetscapePluginStream::~WebNetscapePluginStream()
ASSERT(!m_path);
ASSERT(m_fileDescriptor == -1);
if (m_loader)
m_loader->deref();
[m_request release];
free((void *)m_stream.url);
free(m_headers);
......@@ -264,8 +257,8 @@ void WebNetscapePluginStream::start()
ASSERT(m_request);
ASSERT(!m_frameLoader);
m_loader->documentLoader()->addPlugInStreamLoader(m_loader);
m_loader->load(m_request);
m_loader->documentLoader()->addPlugInStreamLoader(m_loader.get());
m_loader->load(m_request.get());
}
void WebNetscapePluginStream::stop()
......
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