Skip missing nsIDragSession.sourceDocument
See https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIDragSession#Attributes
This commit is contained in:
parent
5e39c1b25b
commit
13eee1e594
@ -1038,6 +1038,8 @@ catch(e) {
|
|||||||
if (!session) //TODO: use some fake nodePrincipal?
|
if (!session) //TODO: use some fake nodePrincipal?
|
||||||
throw 'Drop of ' + aURI + ' denied: no drag session.';
|
throw 'Drop of ' + aURI + ' denied: no drag session.';
|
||||||
let sourceDoc = session.sourceDocument;
|
let sourceDoc = session.sourceDocument;
|
||||||
|
if (!sourceDoc) // The drag originated outside the application
|
||||||
|
return;
|
||||||
let sourceURI = sourceDoc.documentURI;
|
let sourceURI = sourceDoc.documentURI;
|
||||||
let normalizedURI = this.treeStyleTab.makeURIFromSpec(aURI);
|
let normalizedURI = this.treeStyleTab.makeURIFromSpec(aURI);
|
||||||
if (normalizedURI && sourceURI.substr(0, 9) != 'chrome://') {
|
if (normalizedURI && sourceURI.substr(0, 9) != 'chrome://') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user