Collect URIs from <base> tags as possible referrers.
The referrer of a new tab request from webpage can be modified by <base> tags. To detect the opener tab from the referrer, we have to collect URIs defined by <base> tags also. See also: https://dxr.mozilla.org/mozilla-central/rev/f97a056ae6235de7855fd8aaa04fb1c8d183bd06/dom/ipc/ContentParent.cpp#5069
This commit is contained in:
parent
b067c7e7a7
commit
40191c6082
@ -91,6 +91,9 @@
|
||||
collectLocations : function(aFrame, aLocations) {
|
||||
aLocations = aLocations || {};
|
||||
aLocations[aFrame.location.href] = true;
|
||||
Array.forEach(aFrame.document.getElementsByTagName('base'), function(aBase) {
|
||||
aLocations[aBase.href] = true;
|
||||
}, this);
|
||||
Array.forEach(aFrame.frames, function(aSubFrame) {
|
||||
this.collectLocations(aSubFrame, aLocations);
|
||||
}, this);
|
||||
|
Loading…
Reference in New Issue
Block a user