mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-15 21:36:20 +00:00
Bug 1806598 - Part 6: Add Location accessors, window.location, and document.location to allowlist. r=nchevobbe
Location related accessors are not marked Pure, but some testcase expects them to be eagerly evaluateable. Differential Revision: https://phabricator.services.mozilla.com/D168340
This commit is contained in:
parent
79d62c97fa
commit
748388bc15
@ -516,6 +516,20 @@ function ensureSideEffectFreeNatives(maybeEvalGlobal) {
|
||||
"instance" in idlPureAllowlist.Window
|
||||
) {
|
||||
collectMethodsAndGetters(maybeEvalGlobal, idlPureAllowlist.Window.instance);
|
||||
const maybeLocation = maybeEvalGlobal.location;
|
||||
if (maybeLocation) {
|
||||
collectMethodsAndGetters(
|
||||
maybeLocation,
|
||||
idlPureAllowlist.Location.instance
|
||||
);
|
||||
}
|
||||
const maybeDocument = maybeEvalGlobal.document;
|
||||
if (maybeDocument) {
|
||||
collectMethodsAndGetters(
|
||||
maybeDocument,
|
||||
idlPureAllowlist.Document.instance
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const natives = [
|
||||
|
@ -14,6 +14,9 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
Document: {
|
||||
instance: {
|
||||
getters: ["location"],
|
||||
},
|
||||
prototype: {
|
||||
getters: [
|
||||
"URL",
|
||||
@ -118,6 +121,21 @@ module.exports = {
|
||||
methods: ["entries", "keys", "values"],
|
||||
},
|
||||
},
|
||||
Location: {
|
||||
instance: {
|
||||
getters: [
|
||||
"href",
|
||||
"origin",
|
||||
"protocol",
|
||||
"host",
|
||||
"hostname",
|
||||
"port",
|
||||
"pathname",
|
||||
"search",
|
||||
"hash",
|
||||
],
|
||||
},
|
||||
},
|
||||
Node: {
|
||||
prototype: {
|
||||
getters: [
|
||||
@ -183,6 +201,7 @@ module.exports = {
|
||||
Window: {
|
||||
instance: {
|
||||
getters: [
|
||||
"location",
|
||||
"window",
|
||||
"self",
|
||||
"document",
|
||||
|
@ -81,12 +81,17 @@ results = parser.finish()
|
||||
# TODO: Bug 1616013 - Move more of these to be part of the pure list.
|
||||
pure_output = {
|
||||
"Document": {
|
||||
"instance": {
|
||||
"getters": [
|
||||
"location",
|
||||
],
|
||||
},
|
||||
"prototype": {
|
||||
"methods": [
|
||||
"getSelection",
|
||||
"hasStorageAccess",
|
||||
],
|
||||
}
|
||||
},
|
||||
},
|
||||
"Range": {
|
||||
"prototype": {
|
||||
@ -107,6 +112,28 @@ pure_output = {
|
||||
"methods": ["getRangeAt", "containsNode"],
|
||||
}
|
||||
},
|
||||
"Window": {
|
||||
"instance": {
|
||||
"getters": [
|
||||
"location",
|
||||
],
|
||||
},
|
||||
},
|
||||
"Location": {
|
||||
"instance": {
|
||||
"getters": [
|
||||
"href",
|
||||
"origin",
|
||||
"protocol",
|
||||
"host",
|
||||
"hostname",
|
||||
"port",
|
||||
"pathname",
|
||||
"search",
|
||||
"hash",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
deprecated_output = {}
|
||||
for result in results:
|
||||
|
Loading…
x
Reference in New Issue
Block a user