+2007-11-09 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Reviewed by Sam.
+
+ <rdar://5585900>: Safari crashes when selected in context menu to open
+ audio format files (au, aif) with QT 7.3
+
+ The crash occurred on a machine where QT 7.3 was failing to initialize.
+ The fix is to avoid sending streams to full-page plugins that've failed
+ to load
+
+ * WebFrame.cpp:
+ (WebFrame::finishedLoading): Check plugin status before calling manual
+ stream methods
+ (WebFrame::setMainDocumentError): Same
+ (WebFrame::committedLoad): Same
+
2007-11-09 Sam Weinig <sam@webkit.org>
Rubber stamped by Oliver.
if (!d->m_pluginView)
committedLoad(loader, 0, 0);
else {
- d->m_pluginView->didFinishLoading();
+ if (d->m_pluginView->status() == PluginStatusLoadedSuccessfully)
+ d->m_pluginView->didFinishLoading();
d->m_pluginView = 0;
d->m_hasSentResponseToPlugin = false;
}
void WebFrame::setMainDocumentError(DocumentLoader*, const ResourceError& error)
{
if (d->m_pluginView) {
- d->m_pluginView->didFail(error);
+ if (d->m_pluginView->status() == PluginStatusLoadedSuccessfully)
+ d->m_pluginView->didFail(error);
d->m_pluginView = 0;
d->m_hasSentResponseToPlugin = false;
}
if (!d->m_pluginView)
receivedData(data, length, textEncoding);
- if (d->m_pluginView) {
+ if (d->m_pluginView && d->m_pluginView->status() == PluginStatusLoadedSuccessfully) {
if (!d->m_hasSentResponseToPlugin) {
d->m_pluginView->didReceiveResponse(d->frame->loader()->documentLoader()->response());
// didReceiveResponse sets up a new stream to the plug-in. on a full-page plug-in, a failure in
pluginName = pluginView->plugin()->name();
if (!pluginName.isNull()) {
static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInNameKey);
- RetainPtr<CFStringRef> str(AdoptCF, mimeType.createCFString());
+ RetainPtr<CFStringRef> str(AdoptCF, pluginName.createCFString());
CFDictionarySetValue(userInfo.get(), key, str.get());
}