Bug 309306 - Drag and drop of a file onto the Extension Manager works inconsistently and can cause a crash [@ JS_GetPrivate][@ nsWindow::OnDragMotionEvent]. r=mconnor

This commit is contained in:
rob_strong%exchangecode.com 2005-09-26 03:24:32 +00:00
Родитель ea6203d0f7
Коммит df21fa286d
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -755,6 +755,10 @@ var gExtensionsDNDObserver =
onDragEnter: function (aEvent, aDragSession)
{
// XXXrstrong - bug 269568, GTK2 drag and drop is returning invalid data for
// dragenter and dragover. To workaround this we always set canDrop to true
// and just use the xfer data returned in ondrop which is valid.
#ifndef MOZ_WIDGET_GTK2
this._ensureServices();
var count = aDragSession.numDropItems;
@ -765,6 +769,7 @@ var gExtensionsDNDObserver =
return;
}
}
#endif
this._canDrop = true;
},
@ -783,7 +788,7 @@ var gExtensionsDNDObserver =
for (var i = 0; i < count; ++i) {
var fileData = this._getDataFromDragSession(aDragSession, i);
if (!fileData)
return;
continue;
if (fileData.type == nsIUpdateItem.TYPE_EXTENSION) {
xpinstallObj[fileData.fileName] = fileData.fileURL;