зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1171708 - Use localName when detecting <xul:browsers> for XULFrameLoaderCreated. r=billm
We were using tagName before, which is fine for the dynamically created browsers in new tabs, but not fine for the initial browser tab, which has a tagName of "xul:browser" instead of "browser". Using localName makes sure that we don't get the XML namespace included with the node name. We check the XUL namespace separately be checking the namespaceURI. --HG-- extra : commitid : 3bsYYEh62go extra : rebase_source : e99c51de7f6e2420b4e661487c192e2c180b3df2 extra : source : 451741a8b932024db0c5e54184667b6db970813a
This commit is contained in:
Родитель
377e02d7ba
Коммит
23b5e4e712
|
@ -126,6 +126,8 @@ const TAB_EVENTS = [
|
|||
"TabUnpinned"
|
||||
];
|
||||
|
||||
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm", this);
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||
Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", this);
|
||||
|
@ -877,7 +879,10 @@ var SessionStoreInternal = {
|
|||
this.onBrowserCrashed(win, target);
|
||||
break;
|
||||
case "XULFrameLoaderCreated":
|
||||
if (target.tagName == "browser" && target.frameLoader && target.permanentKey) {
|
||||
if (target.namespaceURI == NS_XUL &&
|
||||
target.localName == "browser" &&
|
||||
target.frameLoader &&
|
||||
target.permanentKey) {
|
||||
this._lastKnownFrameLoader.set(target.permanentKey, target.frameLoader);
|
||||
this.resetEpoch(target);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче