зеркало из https://github.com/mozilla/pjs.git
fixes loading data url in nsIURILoader->OpenURI() with 'text/html' content callback results in crash, r=bbaetz, sr=darin, b=170274
This commit is contained in:
Родитель
42a667539c
Коммит
668d6a9264
|
@ -81,6 +81,10 @@ nsTXTToHTMLConv::OnStartRequest(nsIRequest* request, nsISupports *aContext) {
|
|||
// Push mBuffer to the listener now, so the initial HTML will not
|
||||
// be parsed in OnDataAvailable().
|
||||
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(request);
|
||||
NS_ENSURE_TRUE(channel, NS_ERROR_UNEXPECTED);
|
||||
channel->SetContentType(NS_LITERAL_CSTRING("text/html"));
|
||||
|
||||
nsresult rv = mListener->OnStartRequest(request, aContext);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче