Accept drop of non-tab objects onto the tab bar correctly on Firefox 16 and olders
This commit is contained in:
parent
5bd57741df
commit
147d38aef3
@ -1134,11 +1134,17 @@ catch(e) {
|
|||||||
if (!normalizedURI)
|
if (!normalizedURI)
|
||||||
return;
|
return;
|
||||||
let sourceDoc = session.sourceDocument;
|
let sourceDoc = session.sourceDocument;
|
||||||
|
let sourceURI = sourceDoc ? sourceDoc.documentURI : 'file:///' ;
|
||||||
let principal = sourceDoc ?
|
let principal = sourceDoc ?
|
||||||
sourceDoc.nodePrincipal :
|
sourceDoc.nodePrincipal :
|
||||||
SecMan.getSimpleCodebasePrincipal(Services.io.newURI('file:///', null, null)) ;
|
SecMan.getSimpleCodebasePrincipal ? // this method isn't there on Firefox 16 and olders!
|
||||||
|
SecMan.getSimpleCodebasePrincipal(Services.io.newURI(sourceURI, null, null)) :
|
||||||
|
null ;
|
||||||
try {
|
try {
|
||||||
|
if (principal)
|
||||||
SecMan.checkLoadURIStrWithPrincipal(principal, normalizedURI.spec, Ci.nsIScriptSecurityManager.STANDARD);
|
SecMan.checkLoadURIStrWithPrincipal(principal, normalizedURI.spec, Ci.nsIScriptSecurityManager.STANDARD);
|
||||||
|
else
|
||||||
|
SecMan.checkLoadURIStr(sourceURI, normalizedURI.spec, Ci.nsIScriptSecurityManager.STANDARD);
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user