зеркало из https://github.com/mozilla/pjs.git
Bug 293987 Mozilla cannot open PDF document via proxy and It crash after close the tab when it loaded.
Patch by leon.sha@sun.com darin: review+ shaver: superreview+
This commit is contained in:
Родитель
7ad0f586df
Коммит
7a083a5f23
|
@ -1138,16 +1138,18 @@ NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window)
|
|||
}
|
||||
|
||||
// Allocate and fill out the ws_info data
|
||||
if (!window->ws_info) {
|
||||
if (!window->ws_info || !mXtBin) {
|
||||
if (!window->ws_info) {
|
||||
#ifdef NS_DEBUG
|
||||
printf("About to create new ws_info...\n");
|
||||
printf("About to create new ws_info...\n");
|
||||
#endif
|
||||
|
||||
// allocate a new NPSetWindowCallbackStruct structure at ws_info
|
||||
window->ws_info = (NPSetWindowCallbackStruct *)PR_MALLOC(sizeof(NPSetWindowCallbackStruct));
|
||||
// allocate a new NPSetWindowCallbackStruct structure at ws_info
|
||||
window->ws_info = (NPSetWindowCallbackStruct *)PR_MALLOC(sizeof(NPSetWindowCallbackStruct));
|
||||
|
||||
if (!window->ws_info)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
if (!window->ws_info)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
ws = (NPSetWindowCallbackStruct *)window->ws_info;
|
||||
|
||||
|
|
|
@ -6740,6 +6740,15 @@ nsresult nsPluginStreamListenerPeer::ServeStreamAsFile(nsIRequest *request,
|
|||
if (owner) {
|
||||
nsPluginWindow *window = nsnull;
|
||||
owner->GetWindow(window);
|
||||
#if defined (MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2)
|
||||
// Should call GetPluginPort() here.
|
||||
// This part is copied from nsPluginInstanceOwner::GetPluginPort().
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
((nsPluginNativeWindow*)window)->GetPluginWidget(getter_AddRefs(widget));
|
||||
if (widget) {
|
||||
window->window = (nsPluginPort*) widget->GetNativeData(NS_NATIVE_PLUGIN_PORT);
|
||||
}
|
||||
#endif
|
||||
if (window->window)
|
||||
{
|
||||
nsCOMPtr<nsIPluginInstance> inst = mInstance;
|
||||
|
|
Загрузка…
Ссылка в новой задаче