From 1eccf288f249fb0fcea6046f743f02af658c989d Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:21:46 +0800 Subject: [PATCH 01/18] Update features.js --- src/lib/features.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib/features.js b/src/lib/features.js index a336de8a..6d0f572f 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -190,6 +190,19 @@ var featureInfos = }, attributes: { 'web-worker': 'web-worker-restriction' }, }, + CALL_ON_GLOBAL: + { + description: + 'The ability to call function on global object when invoking Function.prototype.call ' + + 'without binding: this will call function on undefined insread in strict mode in ECMAScript ' + + 'compliant engines.', + check: + function () + { + return true; + }, + attributes: { 'forced-strict-mode': 'char-increment-restriction' }, + }, CAPITAL_HTML: { description: From bb1ffdf692b19bab39403635104c7f19fd8b4b1d Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:21:50 +0800 Subject: [PATCH 02/18] Update definitions.js --- src/lib/definitions.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index 8c1ef0b3..03e26fd1 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -355,6 +355,7 @@ function getFHPaddingEntries(index) var AT = Feature.AT; var ATOB = Feature.ATOB; var BARPROP = Feature.BARPROP; + var CALL_ON_GLOBAL = Feature.CALL_ON_GLOBAL; var CAPITAL_HTML = Feature.CAPITAL_HTML; var CONSOLE = Feature.CONSOLE; var DOCUMENT = Feature.DOCUMENT; @@ -1068,10 +1069,18 @@ function getFHPaddingEntries(index) [ define('"w"[TO_UPPER_CASE]()'), define('(self + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW), + define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), define('btoa(undefined)[1]', ATOB), define('(RP_0_S + self)[11]', DOMWINDOW), define('(RP_3_WA + self)[11]', OBJECT_W_SELF), - define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), + define('([].sort.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), + define('([].fill.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), + define('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), + define('([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), + define('(RP_0_S + [].sort.call())[11]', CALL_ON_GLOBAL, DOMWINDOW), + define('(RP_0_S + [].fill.call())[11]', CALL_ON_GLOBAL, DOMWINDOW, FILL), + define('(RP_3_WA + [].sort.call())[11]', CALL_ON_GLOBAL, WINDOW), + define('(RP_3_WA + [].fill.call())[11]', CALL_ON_GLOBAL, WINDOW, FILL), defineCharDefault({ atob: false }), ], 'X': @@ -1191,7 +1200,15 @@ function getFHPaddingEntries(index) define('atob("undefined0")[1]', ATOB), define('(RP_4_A + self)[20]', DOMWINDOW), define('(RP_0_S + self)[13]', WINDOW), + define('([].sort.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL), + define('([].fill.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), define('(self + RP_0_S).at("-2")', ANY_WINDOW, AT), + define('([].sort.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL), + define('([].fill.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), + define('(RP_4_A + [].sort.call())[20]', CALL_ON_GLOBAL, DOMWINDOW), + define('(RP_4_A + [].fill.call())[20]', CALL_ON_GLOBAL, DOMWINDOW, FILL), + define('(RP_0_S + [].sort.call())[13]', CALL_ON_GLOBAL, WINDOW), + define('(RP_0_S + [].fill.call())[13]', CALL_ON_GLOBAL, FILL, WINDOW), ], 'x': [ From 35c9f4ecd75cb4341475ef09101ed72da8e67b34 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:35:59 +0800 Subject: [PATCH 03/18] Update definitions.js --- src/lib/definitions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index 03e26fd1..a290fa0b 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1069,10 +1069,10 @@ function getFHPaddingEntries(index) [ define('"w"[TO_UPPER_CASE]()'), define('(self + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW), - define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), define('btoa(undefined)[1]', ATOB), define('(RP_0_S + self)[11]', DOMWINDOW), define('(RP_3_WA + self)[11]', OBJECT_W_SELF), + define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), define('([].sort.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define('([].fill.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), define('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), From 06a1662f37349262a4b9bed6ac24f9f5df3a85e4 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:41:19 +0800 Subject: [PATCH 04/18] Update definitions.js --- src/lib/definitions.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index a290fa0b..d3544eb9 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1076,7 +1076,8 @@ function getFHPaddingEntries(index) define('([].sort.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define('([].fill.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), define('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), - define('([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), + define // * + ('([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), define('(RP_0_S + [].sort.call())[11]', CALL_ON_GLOBAL, DOMWINDOW), define('(RP_0_S + [].fill.call())[11]', CALL_ON_GLOBAL, DOMWINDOW, FILL), define('(RP_3_WA + [].sort.call())[11]', CALL_ON_GLOBAL, WINDOW), @@ -1200,8 +1201,10 @@ function getFHPaddingEntries(index) define('atob("undefined0")[1]', ATOB), define('(RP_4_A + self)[20]', DOMWINDOW), define('(RP_0_S + self)[13]', WINDOW), - define('([].sort.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL), - define('([].fill.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), + define // * + ('([].sort.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL), + define // * + ('([].fill.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), define('(self + RP_0_S).at("-2")', ANY_WINDOW, AT), define('([].sort.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define('([].fill.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), From 7475552e2d01e97cdb4e8a3603fb91dbdb05b7a5 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:42:10 +0800 Subject: [PATCH 05/18] Update features.js --- src/lib/features.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/features.js b/src/lib/features.js index 6d0f572f..18d24df9 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -194,8 +194,8 @@ var featureInfos = { description: 'The ability to call function on global object when invoking Function.prototype.call ' + - 'without binding: this will call function on undefined insread in strict mode in ECMAScript ' + - 'compliant engines.', + 'without binding: this will call function on undefined insread in strict mode in ' + + 'ECMAScript compliant engines.', check: function () { From 5bd5e995445cb161065d4080f574d272fde8e246 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:46:17 +0800 Subject: [PATCH 06/18] Update definitions.js --- src/lib/definitions.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index d3544eb9..a411ac50 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1203,8 +1203,13 @@ function getFHPaddingEntries(index) define('(RP_0_S + self)[13]', WINDOW), define // * ('([].sort.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL), - define // * - ('([].fill.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), + define + ( + '([].fill.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', + ANY_WINDOW, + CALL_ON_GLOBAL, + FILL + ), define('(self + RP_0_S).at("-2")', ANY_WINDOW, AT), define('([].sort.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define('([].fill.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), From 2894c6464f158faa99a5fec750b6d170bc4e0e93 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:48:18 +0800 Subject: [PATCH 07/18] Update definitions.js --- src/lib/definitions.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index a411ac50..4a6bc245 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1076,8 +1076,13 @@ function getFHPaddingEntries(index) define('([].sort.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define('([].fill.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), define('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), - define // * - ('([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL, FILL), + define + ( + '([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', + ANY_WINDOW, + CALL_ON_GLOBAL, + FILL + ), define('(RP_0_S + [].sort.call())[11]', CALL_ON_GLOBAL, DOMWINDOW), define('(RP_0_S + [].fill.call())[11]', CALL_ON_GLOBAL, DOMWINDOW, FILL), define('(RP_3_WA + [].sort.call())[11]', CALL_ON_GLOBAL, WINDOW), From f793c2db968b84df8c0b5fc6c10356dcd4178d09 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 1 Sep 2024 16:29:42 +0800 Subject: [PATCH 08/18] Update definitions.js --- src/lib/definitions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index 4a6bc245..485de52e 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1075,7 +1075,8 @@ function getFHPaddingEntries(index) define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), define('([].sort.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define('([].fill.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), - define('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), + define // * + ('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), define ( '([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', From bf3eec163a2d685e47b3823a29b1a456d06e0f41 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 8 Sep 2024 12:27:57 +0800 Subject: [PATCH 09/18] Update features.js --- src/lib/features.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/features.js b/src/lib/features.js index 18d24df9..227c117f 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -194,12 +194,17 @@ var featureInfos = { description: 'The ability to call function on global object when invoking Function.prototype.call ' + - 'without binding: this will call function on undefined insread in strict mode in ' + - 'ECMAScript compliant engines.', + 'without binding.', check: function () { - return true; + try + { + [].sort.call(); + return true; + } + catch (error) + { } }, attributes: { 'forced-strict-mode': 'char-increment-restriction' }, }, @@ -904,6 +909,7 @@ var featureInfos = 'ANY_DOCUMENT', 'ATOB', 'CONSOLE', + 'CALL_ON_GLOBAL' 'DOMWINDOW', 'ESC_HTML_ALL', 'FUNCTION_22_LF', @@ -921,7 +927,7 @@ var featureInfos = { inherits: 'ANDRO_4_0', versions: [['4.1',, '4.3']], - includes: { GENERIC_ARRAY_TO_STRING: true, OBJECT_UNDEFINED: true }, + includes: { CALL_ON_GLOBAL: false, GENERIC_ARRAY_TO_STRING: true, OBJECT_UNDEFINED: true }, }, ANDRO_4_4: { From 6ef51b070ec3d79382bff682a9a665810c1972a8 Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sun, 8 Sep 2024 12:45:25 +0800 Subject: [PATCH 10/18] Update features.js --- src/lib/features.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/features.js b/src/lib/features.js index 227c117f..bf5377af 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -206,7 +206,6 @@ var featureInfos = catch (error) { } }, - attributes: { 'forced-strict-mode': 'char-increment-restriction' }, }, CAPITAL_HTML: { From 8f233cbb59108d2cf00a88543632b47d03b420c1 Mon Sep 17 00:00:00 2001 From: Clay Date: Wed, 18 Sep 2024 10:15:58 +0800 Subject: [PATCH 11/18] update definitions --- src/lib/definitions.js | 32 ++++++++++---------------------- src/lib/features.js | 2 +- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index 485de52e..fa6a1041 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1073,21 +1073,15 @@ function getFHPaddingEntries(index) define('(RP_0_S + self)[11]', DOMWINDOW), define('(RP_3_WA + self)[11]', OBJECT_W_SELF), define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), - define('([].sort.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), - define('([].fill.call() + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), - define // * - ('([].sort.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, CALL_ON_GLOBAL), + define('([].concat.call()[0] + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), define ( - '([].fill.call() + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', + '([].concat.call()[0] + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW, - CALL_ON_GLOBAL, - FILL + CALL_ON_GLOBAL ), - define('(RP_0_S + [].sort.call())[11]', CALL_ON_GLOBAL, DOMWINDOW), - define('(RP_0_S + [].fill.call())[11]', CALL_ON_GLOBAL, DOMWINDOW, FILL), - define('(RP_3_WA + [].sort.call())[11]', CALL_ON_GLOBAL, WINDOW), - define('(RP_3_WA + [].fill.call())[11]', CALL_ON_GLOBAL, WINDOW, FILL), + define('(RP_0_S + [].concat.call()[0])[11]', CALL_ON_GLOBAL, DOMWINDOW), + define('(RP_3_WA + [].concat.call()[0])[11]', CALL_ON_GLOBAL, WINDOW), defineCharDefault({ atob: false }), ], 'X': @@ -1207,22 +1201,16 @@ function getFHPaddingEntries(index) define('atob("undefined0")[1]', ATOB), define('(RP_4_A + self)[20]', DOMWINDOW), define('(RP_0_S + self)[13]', WINDOW), - define // * - ('([].sort.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, CALL_ON_GLOBAL), define ( - '([].fill.call() + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', + '([].concat.call()[0] + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', ANY_WINDOW, - CALL_ON_GLOBAL, - FILL + CALL_ON_GLOBAL ), define('(self + RP_0_S).at("-2")', ANY_WINDOW, AT), - define('([].sort.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL), - define('([].fill.call() + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL, FILL), - define('(RP_4_A + [].sort.call())[20]', CALL_ON_GLOBAL, DOMWINDOW), - define('(RP_4_A + [].fill.call())[20]', CALL_ON_GLOBAL, DOMWINDOW, FILL), - define('(RP_0_S + [].sort.call())[13]', CALL_ON_GLOBAL, WINDOW), - define('(RP_0_S + [].fill.call())[13]', CALL_ON_GLOBAL, FILL, WINDOW), + define('([].concat.call()[0] + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL), + define('(RP_4_A + [].concat.call()[0])[20]', CALL_ON_GLOBAL, DOMWINDOW), + define('(RP_0_S + [].concat.call()[0])[13]', CALL_ON_GLOBAL, WINDOW), ], 'x': [ diff --git a/src/lib/features.js b/src/lib/features.js index bf5377af..6417c1c4 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -200,7 +200,7 @@ var featureInfos = { try { - [].sort.call(); + [].concat.call(); return true; } catch (error) From 99091e1d60b3d6abd31839c0dbea9d61c2184ca2 Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 19 Sep 2024 00:31:57 +0800 Subject: [PATCH 12/18] update definitions --- src/lib/definitions.js | 50 +++++++++++++++++++++++++++--------------- src/lib/features.js | 6 ++--- 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index fa6a1041..da3b298d 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -910,6 +910,8 @@ function getFHPaddingEntries(index) ({ expr: '(RP_3_WA + Function("return history")())[11]', optimize: true }, HISTORY), define('(RP_1_WA + Audio)[10]', HTMLAUDIOELEMENT), define('(RP_4_A + [].entries().filter(ANY_FUNCTION))[21]', ITERATOR_HELPER), + define + ({ expr: '(RP_3_WA + self.history)[11]', optimize: true }, HISTORY, SELF_OBJ), ], 'I': '"Infinity"[0]', 'J': @@ -954,6 +956,8 @@ function getFHPaddingEntries(index) AT, LOCATION ), + define + ('self[TO_STRING].call(location)[SLICE_OR_SUBSTR]("-10")[1]', LOCATION, SELF_OBJ), define('(LOCATION_CONSTRUCTOR + RP_0_S).at("-20")', AT, OLD_SAFARI_LOCATION_CTOR), define ( @@ -968,6 +972,13 @@ function getFHPaddingEntries(index) GENERIC_ARRAY_TO_STRING, LOCATION ), + define + ( + '(self[TO_STRING].call(location) + RP_1_WA).at("-10")', + AT, + LOCATION, + SELF_OBJ + ), ], 'M': [ @@ -997,6 +1008,7 @@ function getFHPaddingEntries(index) define('btoa("".italics())[0]', ATOB), define('(RP_0_S + Function("return statusbar")())[11]', BARPROP), define('"0".sup()[10]', CAPITAL_HTML), + define('(RP_0_S + self.statusbar)[11]', BARPROP, SELF_OBJ), defineCharDefault({ atob: false, charCode: false }), ], 'Q': @@ -1073,15 +1085,6 @@ function getFHPaddingEntries(index) define('(RP_0_S + self)[11]', DOMWINDOW), define('(RP_3_WA + self)[11]', OBJECT_W_SELF), define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT), - define('([].concat.call()[0] + RP_4_A).at("-11")', ANY_WINDOW, AT, CALL_ON_GLOBAL), - define - ( - '([].concat.call()[0] + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', - ANY_WINDOW, - CALL_ON_GLOBAL - ), - define('(RP_0_S + [].concat.call()[0])[11]', CALL_ON_GLOBAL, DOMWINDOW), - define('(RP_3_WA + [].concat.call()[0])[11]', CALL_ON_GLOBAL, WINDOW), defineCharDefault({ atob: false }), ], 'X': @@ -1201,16 +1204,7 @@ function getFHPaddingEntries(index) define('atob("undefined0")[1]', ATOB), define('(RP_4_A + self)[20]', DOMWINDOW), define('(RP_0_S + self)[13]', WINDOW), - define - ( - '([].concat.call()[0] + RP_0_S)[SLICE_OR_SUBSTR]("-2")[0]', - ANY_WINDOW, - CALL_ON_GLOBAL - ), define('(self + RP_0_S).at("-2")', ANY_WINDOW, AT), - define('([].concat.call()[0] + RP_0_S).at("-2")', ANY_WINDOW, AT, CALL_ON_GLOBAL), - define('(RP_4_A + [].concat.call()[0])[20]', CALL_ON_GLOBAL, DOMWINDOW), - define('(RP_0_S + [].concat.call()[0])[13]', CALL_ON_GLOBAL, WINDOW), ], 'x': [ @@ -1348,6 +1342,7 @@ function getFHPaddingEntries(index) Audio: [ define('Function("return Audio")()', HTMLAUDIOELEMENT), + define('self.Audio', HTMLAUDIOELEMENT, SELF_OBJ), ], Boolean: [ @@ -1356,6 +1351,7 @@ function getFHPaddingEntries(index) Date: [ define('Function("return Date")()'), + define('self.Date', SELF_OBJ), ], Function: [ @@ -1390,30 +1386,37 @@ function getFHPaddingEntries(index) atob: [ define('Function("return atob")()', ATOB), + define('self.atob', ATOB, SELF_OBJ), ], btoa: [ define('Function("return btoa")()', ATOB), + define('self.btoa', ATOB, SELF_OBJ), ], document: [ define({ expr: 'Function("return document")()', optimize: true }, ANY_DOCUMENT), + define({ expr: 'self.document', optimize: true }, ANY_DOCUMENT, SELF_OBJ), ], escape: [ define({ expr: 'Function("return escape")()', optimize: true }), + define({ expr: 'self.escape', optimize: true }, SELF_OBJ), ], location: [ define('Function("return location")()', LOCATION), + define('self.location', LOCATION, SELF_OBJ), ], self: [ define('Function("return self")()', SELF_OBJ), + define('[].concat.call()[0]', CALL_ON_GLOBAL, SELF_OBJ), ], unescape: [ define({ expr: 'Function("return unescape")()', optimize: true }), + define({ expr: 'self.unescape', optimize: true }, SELF_OBJ), ], // Custom definitions @@ -1562,6 +1565,8 @@ function getFHPaddingEntries(index) [ define('Function("return location")().constructor', OBJECT_L_LOCATION_CTOR), define('Function("return location")().constructor', OLD_SAFARI_LOCATION_CTOR), + define('self.location.constructor', OBJECT_L_LOCATION_CTOR, SELF_OBJ), + define('self.location.constructor', OLD_SAFARI_LOCATION_CTOR, SELF_OBJ), ], PLAIN_OBJECT: [ @@ -1618,6 +1623,15 @@ function getFHPaddingEntries(index) }, MOZILLA ), + define + ( + { + expr: 'self.navigator.userAgent', + solutionType: SolutionType.STRING, + }, + MOZILLA, + SELF_OBJ + ), ], // Function body extra padding blocks: prepended to a function to align the function's body diff --git a/src/lib/features.js b/src/lib/features.js index 6417c1c4..37099214 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -193,8 +193,8 @@ var featureInfos = CALL_ON_GLOBAL: { description: - 'The ability to call function on global object when invoking Function.prototype.call ' + - 'without binding.', + 'The ability to call a function on the global object when invoking ' + + 'Function.prototype.call without binding.', check: function () { @@ -907,8 +907,8 @@ var featureInfos = [ 'ANY_DOCUMENT', 'ATOB', + 'CALL_ON_GLOBAL', 'CONSOLE', - 'CALL_ON_GLOBAL' 'DOMWINDOW', 'ESC_HTML_ALL', 'FUNCTION_22_LF', From a99e09a469093c7b0674d05afcbb4afd4bb5c99c Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 19 Sep 2024 00:41:36 +0800 Subject: [PATCH 13/18] update definitions --- src/lib/definitions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index da3b298d..af198e64 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1360,10 +1360,12 @@ function getFHPaddingEntries(index) Intl: [ define('Function("return Intl")()', INTL), + define('self.Intl', INTL, SELF_OBJ), ], Node: [ define('Function("return Node")()', NODECONSTRUCTOR), + define('self.Node', NODECONSTRUCTOR, SELF_OBJ), ], Number: [ From bd4771da1430bd511a09a29409fcd9778372966c Mon Sep 17 00:00:00 2001 From: Clay Date: Thu, 19 Sep 2024 20:02:04 +0800 Subject: [PATCH 14/18] update definitions --- src/lib/definitions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index af198e64..48dd6731 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -956,8 +956,6 @@ function getFHPaddingEntries(index) AT, LOCATION ), - define - ('self[TO_STRING].call(location)[SLICE_OR_SUBSTR]("-10")[1]', LOCATION, SELF_OBJ), define('(LOCATION_CONSTRUCTOR + RP_0_S).at("-20")', AT, OLD_SAFARI_LOCATION_CTOR), define ( @@ -966,6 +964,8 @@ function getFHPaddingEntries(index) LOCATION ), define + ('self[TO_STRING].call(location)[SLICE_OR_SUBSTR]("-10")[1]', LOCATION, SELF_OBJ), + define ( '([][TO_STRING].call(location) + RP_1_WA).at("-10")', AT, @@ -1351,7 +1351,7 @@ function getFHPaddingEntries(index) Date: [ define('Function("return Date")()'), - define('self.Date', SELF_OBJ), + define('self.Date', SELF_OBJ), ], Function: [ From 939cee879d894930f3cbc07043b42c581e20d45b Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sat, 21 Sep 2024 02:21:56 +0800 Subject: [PATCH 15/18] Update src/lib/features.js Co-authored-by: Francesco Trotta --- src/lib/features.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/features.js b/src/lib/features.js index 37099214..00a8186d 100644 --- a/src/lib/features.js +++ b/src/lib/features.js @@ -200,8 +200,8 @@ var featureInfos = { try { - [].concat.call(); - return true; + if ([].concat.call()[0]) + return true; } catch (error) { } From 74ad3611be8ff34f71cc68e9e456323969079a4a Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sat, 21 Sep 2024 02:22:07 +0800 Subject: [PATCH 16/18] Update src/lib/definitions.js Co-authored-by: Francesco Trotta --- src/lib/definitions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index 48dd6731..e16fa2f2 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -910,8 +910,7 @@ function getFHPaddingEntries(index) ({ expr: '(RP_3_WA + Function("return history")())[11]', optimize: true }, HISTORY), define('(RP_1_WA + Audio)[10]', HTMLAUDIOELEMENT), define('(RP_4_A + [].entries().filter(ANY_FUNCTION))[21]', ITERATOR_HELPER), - define - ({ expr: '(RP_3_WA + self.history)[11]', optimize: true }, HISTORY, SELF_OBJ), + define({ expr: '(RP_3_WA + self.history)[11]', optimize: true }, HISTORY, SELF_OBJ), ], 'I': '"Infinity"[0]', 'J': From e26e40b9672a0cb0c1ec36a82923399394bd1efc Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sat, 21 Sep 2024 02:22:19 +0800 Subject: [PATCH 17/18] Update src/lib/definitions.js Co-authored-by: Francesco Trotta --- src/lib/definitions.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index e16fa2f2..a550f843 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -971,13 +971,7 @@ function getFHPaddingEntries(index) GENERIC_ARRAY_TO_STRING, LOCATION ), - define - ( - '(self[TO_STRING].call(location) + RP_1_WA).at("-10")', - AT, - LOCATION, - SELF_OBJ - ), + define('(self[TO_STRING].call(location) + RP_1_WA).at("-10")', AT, LOCATION, SELF_OBJ), ], 'M': [ From e26fa71a885d9828ff1f5114f846c1be3ee319dc Mon Sep 17 00:00:00 2001 From: Clayblockunova <41379534+Clayblockunova@users.noreply.github.com> Date: Sat, 21 Sep 2024 02:22:29 +0800 Subject: [PATCH 18/18] Update src/lib/definitions.js Co-authored-by: Francesco Trotta --- src/lib/definitions.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/definitions.js b/src/lib/definitions.js index a550f843..52a546f5 100644 --- a/src/lib/definitions.js +++ b/src/lib/definitions.js @@ -1620,10 +1620,7 @@ function getFHPaddingEntries(index) ), define ( - { - expr: 'self.navigator.userAgent', - solutionType: SolutionType.STRING, - }, + { expr: 'self.navigator.userAgent', solutionType: SolutionType.STRING }, MOZILLA, SELF_OBJ ),