mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
More TODOs in the the plugin stream code, use the NullableString mechanisms which were invented after this landed.
This commit is contained in:
parent
3e0ae20e17
commit
53bf5266c6
@ -61,19 +61,17 @@ BrowserStreamChild::BrowserStreamChild(PluginInstanceChild* instance,
|
||||
|
||||
memset(&mStream, 0, sizeof(mStream));
|
||||
mStream.ndata = static_cast<AStream*>(this);
|
||||
if (!mURL.IsEmpty())
|
||||
mStream.url = mURL.get();
|
||||
mStream.url = NullableStringGet(mURL);
|
||||
mStream.end = length;
|
||||
mStream.lastmodified = lastmodified;
|
||||
if (notifyData)
|
||||
mStream.notifyData =
|
||||
static_cast<const StreamNotifyChild*>(notifyData)->mClosure;
|
||||
if (!mHeaders.IsEmpty())
|
||||
mStream.headers = mHeaders.get();
|
||||
mStream.headers = NullableStringGet(mHeaders);
|
||||
|
||||
*rv = mInstance->mPluginIface->newstream(&mInstance->mData,
|
||||
const_cast<char*>(mimeType.get()),
|
||||
&mStream, seekable, stype);
|
||||
*rv = mInstance->mPluginIface->newstream(
|
||||
&mInstance->mData, const_cast<char*>(NullableStringGet(mimeType)),
|
||||
&mStream, seekable, stype);
|
||||
if (*rv != NPERR_NO_ERROR)
|
||||
mClosed = true;
|
||||
}
|
||||
|
@ -472,18 +472,18 @@ PluginInstanceParent::NPP_NewStream(NPMIMEType type, NPStream* stream,
|
||||
NPBool seekable, uint16_t* stype)
|
||||
{
|
||||
_MOZ_LOG(__FUNCTION__);
|
||||
|
||||
|
||||
BrowserStreamParent* bs = new BrowserStreamParent(this, stream);
|
||||
|
||||
NPError err;
|
||||
// TODO are any of these strings nullable?
|
||||
if (!CallPBrowserStreamConstructor(bs,
|
||||
nsCString(stream->url),
|
||||
NullableString(stream->url),
|
||||
stream->end,
|
||||
stream->lastmodified,
|
||||
static_cast<PStreamNotifyParent*>(stream->notifyData),
|
||||
nsCString(stream->headers),
|
||||
nsCString(type), seekable, &err, stype))
|
||||
NullableString(stream->headers),
|
||||
NullableString(type), seekable,
|
||||
&err, stype))
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
if (NPERR_NO_ERROR != err)
|
||||
|
Loading…
Reference in New Issue
Block a user