Commit e7324d0c authored by wang's avatar wang

适配不同版本 chrome

parent 64d71ee9
......@@ -112,7 +112,7 @@ let a = 0.08636862211354912 * 4294967296
let bl_2 = a >>> 0
// cbb_63 = window["performance"]["now"]();
// var bl_1 = cbb_63 >>> 0;
let a1 = 1181
let a1 = 8580
let bl_1 = a1 >>>0;
// var bl_3 = Number(new window["Date"]()) >>> 0;
let bl_3 = 1693903208580 >>> 0;
......@@ -122,7 +122,10 @@ let bl_0 = 2389837486;
console.log(bl_2, bl_1, bl_3)
bl_0 = bl_0 + bl_2 + bl_1
bl_2 = bl_3
console.log(bl_0)
console.log('bl_2', bl_2 )
console.log('bl_0', bl_0 )
console.log(bl_0 + bl_3 )
console.log((bl_0 + bl_3 ) >>> 0)
bl_0 = bl_0 + bl_3 +bl_4
console.log(bl_0 >>> 0)
......@@ -872,7 +872,7 @@ try {
navigator.userAgentData && navigator.userAgentData.getHighEntropyValues(['architecture', 'bitness', 'brands', 'mobile', 'model', 'platform',
'platformVersion', 'uaFullVersion', 'wow64', 'fullVersionList']).then(e => {
userAgentData['highValue'] = e
userAgentData['highvalue'] = e
userAgentData['brands'] = navigator.userAgentData.brands
userAgentData['mobile'] = navigator.userAgentData.mobile
userAgentData['platform'] = navigator.userAgentData.platform
......
......@@ -91,9 +91,9 @@ for i in range(100):
t1 = time.time()
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json()
# p = subprocess.Popen(['node', 'js_dom_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'js_dom_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_chrome_105.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run_company_chrome.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run.js', selectId, '11'], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -289,11 +289,6 @@
"enumerable": false,
"configurable": true
},
"SharedArrayBuffer": {
"writable": true,
"enumerable": false,
"configurable": true
},
"Atomics": {
"writable": true,
"enumerable": false,
......
......@@ -4,7 +4,7 @@ var v_saf;
var n = Function.toString, t = [], i = [], o = [].indexOf.bind(t), e = [].push.bind(t), r = [].push.bind(i);
function u(n, t, tag) {
return -1 == o(n) && (e(n), r(`function ${tag ? tag : ""}${t || n.name || ""}() { [native code] }`.replaceAll('get get', 'get'))), n
return -1 == o(n) && (e(n), r(`function ${tag ? tag : ""}${t || n.name || ""}() { [native code] }`.replaceAll('get get', 'get').replaceAll('set set', 'set'))), n
}
Object.defineProperty(Function.prototype, "toString", {
......@@ -3417,6 +3417,9 @@ exports.install = (globalObject, globalNames) => {
if (Object.getOwnPropertyDescriptor(Document.prototype, e)['get']){
r[e]['get'] = v_saf(Object.getOwnPropertyDescriptor(Document.prototype, e)['get'],undefined, 'get ')
}
if (Object.getOwnPropertyDescriptor(Document.prototype, e)['set']){
r[e]['set'] = v_saf(Object.getOwnPropertyDescriptor(Document.prototype, e)['set'],undefined, 'set ')
}
})
Object.defineProperties(Document.prototype, r)
if (globalObject[ctorRegistrySymbol] === undefined) {
......
......@@ -211,6 +211,7 @@ exports.install = (globalObject, globalNames) => {
}
get length() {
return 2
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
......
......@@ -48,55 +48,10 @@ exports._internalSetup = (wrapper, globalObject) => {
Object.defineProperties(
wrapper,
Object.getOwnPropertyDescriptors({
assign(url) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'assign' called on an object that is not a valid instance of Location.");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'assign' on 'Location': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'assign' on 'Location': parameter 1"
});
args.push(curArg);
}
return esValue[implSymbol].assign(...args);
},
replace(url) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'replace' called on an object that is not a valid instance of Location.");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'replace' on 'Location': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'replace' on 'Location': parameter 1"
});
args.push(curArg);
}
return esValue[implSymbol].replace(...args);
},
reload() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'reload' called on an object that is not a valid instance of Location.");
get ancestorOrigins() {
return {
length:0
}
return esValue[implSymbol].reload();
},
get href() {
const esValue = this !== null && this !== undefined ? this : globalObject;
......@@ -120,14 +75,6 @@ exports._internalSetup = (wrapper, globalObject) => {
esValue[implSymbol]["href"] = V;
},
toString() {
const esValue = this;
if (!exports.is(esValue)) {
throw new TypeError("'toString' called on an object that is not a valid instance of Location.");
}
return esValue[implSymbol]["href"];
},
get origin() {
const esValue = this !== null && this !== undefined ? this : globalObject;
......@@ -269,11 +216,7 @@ exports._internalSetup = (wrapper, globalObject) => {
esValue[implSymbol]["search"] = V;
},
get ancestorOrigins() {
return {
length:0
}
},
get hash() {
const esValue = this !== null && this !== undefined ? this : globalObject;
......@@ -295,7 +238,66 @@ exports._internalSetup = (wrapper, globalObject) => {
});
esValue[implSymbol]["hash"] = V;
},
assign(url) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'assign' called on an object that is not a valid instance of Location.");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'assign' on 'Location': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'assign' on 'Location': parameter 1"
});
args.push(curArg);
}
return esValue[implSymbol].assign(...args);
},
reload() {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'reload' called on an object that is not a valid instance of Location.");
}
return esValue[implSymbol].reload();
},
replace(url) {
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'replace' called on an object that is not a valid instance of Location.");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'replace' on 'Location': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'replace' on 'Location': parameter 1"
});
args.push(curArg);
}
return esValue[implSymbol].replace(...args);
},
toString() {
const esValue = this;
if (!exports.is(esValue)) {
throw new TypeError("'toString' called on an object that is not a valid instance of Location.");
}
return esValue[implSymbol]["href"];
},
})
);
......
......@@ -97,6 +97,8 @@ exports.install = (globalObject, globalNames) => {
}
now() {
return Number('1693903208580'.slice(8))
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
throw new TypeError("'now' called on an object that is not a valid instance of Performance.");
......
......@@ -12,7 +12,7 @@ var v_saf;
var n = Function.toString, t = [], i = [], o = [].indexOf.bind(t), e = [].push.bind(t), r = [].push.bind(i);
function u(n, t, tag) {
return -1 == o(n) && (e(n), r(`function ${tag ? tag : ""}${t || n.name || ""}() { [native code] }`.replaceAll("get get", 'get'))), n
return -1 == o(n) && (e(n), r(`function ${tag ? tag : ""}${t || n.name || ""}() { [native code] }`.replaceAll("get get", 'get').replaceAll("set set", 'set'))), n
}
Object.defineProperty(Function.prototype, "toString", {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment