diff --git a/dom/plugins/BrowserStreamChild.cpp b/dom/plugins/BrowserStreamChild.cpp index 4dbf38d42e6..9184cd6e135 100644 --- a/dom/plugins/BrowserStreamChild.cpp +++ b/dom/plugins/BrowserStreamChild.cpp @@ -61,19 +61,17 @@ BrowserStreamChild::BrowserStreamChild(PluginInstanceChild* instance, memset(&mStream, 0, sizeof(mStream)); mStream.ndata = static_cast(this); - if (!mURL.IsEmpty()) - mStream.url = mURL.get(); + mStream.url = NullableStringGet(mURL); mStream.end = length; mStream.lastmodified = lastmodified; if (notifyData) mStream.notifyData = static_cast(notifyData)->mClosure; - if (!mHeaders.IsEmpty()) - mStream.headers = mHeaders.get(); + mStream.headers = NullableStringGet(mHeaders); - *rv = mInstance->mPluginIface->newstream(&mInstance->mData, - const_cast(mimeType.get()), - &mStream, seekable, stype); + *rv = mInstance->mPluginIface->newstream( + &mInstance->mData, const_cast(NullableStringGet(mimeType)), + &mStream, seekable, stype); if (*rv != NPERR_NO_ERROR) mClosed = true; } diff --git a/dom/plugins/PluginInstanceParent.cpp b/dom/plugins/PluginInstanceParent.cpp index 5cd0d586b6b..ee76d69e39b 100644 --- a/dom/plugins/PluginInstanceParent.cpp +++ b/dom/plugins/PluginInstanceParent.cpp @@ -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(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)