зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271125 part 1 - wrap() only for non-chrome; r=jmaher
Checking window.Components is a heuristic already used at the top of the file for initializing _EU_C*, and it seems to work on try. MozReview-Commit-ID: 3nbFAEJMY7h
This commit is contained in:
Родитель
9fc7d0745c
Коммит
123bc81472
|
@ -1815,7 +1815,10 @@ function synthesizeDragStart(element, expectedDragData, aWindow, x, y)
|
|||
var result = "trapDrag was not called";
|
||||
var trapDrag = function(event) {
|
||||
try {
|
||||
var dataTransfer = event.dataTransfer;
|
||||
// We must wrap only in plain mochitests, not chrome
|
||||
var c = Object.getOwnPropertyDescriptor(window, 'Components');
|
||||
var dataTransfer = c.value && !c.writable
|
||||
? event.dataTransfer : SpecialPowers.wrap(event.dataTransfer);
|
||||
result = null;
|
||||
if (!dataTransfer)
|
||||
throw "no dataTransfer";
|
||||
|
|
Загрузка…
Ссылка в новой задаче