Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Nov 19, 2024
1 parent 8390d11 commit e8d12dd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
40 changes: 28 additions & 12 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/record.js b/dist/record.js
index 46ec389fefb698243008b39db65470dbdf0a3857..76f3ba31e4a65de97f82aca7b19ebbe79c5de93e 100644
index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc3befe706 100644
--- a/dist/record.js
+++ b/dist/record.js
@@ -20,6 +20,15 @@ const testableAccessors$1 = {
Expand All @@ -18,29 +18,36 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..76f3ba31e4a65de97f82aca7b19ebbe7
const testableMethods$1 = {
Node: ["contains", "getRootNode"],
ShadowRoot: ["getSelection"],
@@ -35,14 +44,14 @@ function getUntaintedPrototype$1(key) {
const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;
@@ -36,13 +45,13 @@ function getUntaintedPrototype$1(key) {
const isUntaintedAccessors = Boolean(
accessorNames && // @ts-expect-error 2345
- accessorNames.every(
accessorNames.every(
- (accessor) => {
- var _a2, _b;
- return Boolean(
- (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
- );
- }
- )
+ accessorNames.every((accessor) => {
+ const candidate = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)?.get;
+ let isUntainted = isNativeFunction(candidate);
+ if (key === 'MutationObserver') {
+ isUntainted = isUntainted && !isAngularZonePatchedFunction(candidate);
+ }
+ return isUntainted;
+ }),
+ (accessor) => {
+ var _a2, _b;
+ return Boolean(
+ (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
+ );
+ }
+ ),
);
const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;
const isUntaintedMethods = Boolean(
@@ -54,7 +63,7 @@ function getUntaintedPrototype$1(key) {
}
)
);
- if (isUntaintedAccessors && isUntaintedMethods) {
+ if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePatchedFunction(defaultObj)) {
untaintedBasePrototype$1[key] = defaultObj.prototype;
return defaultObj.prototype;
}
@@ -246,6 +255,9 @@ function isCSSImportRule(rule2) {
function isCSSStyleRule(rule2) {
return "selectorText" in rule2;
Expand Down Expand Up @@ -7579,6 +7586,15 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..76f3ba31e4a65de97f82aca7b19ebbe7
class BaseRRNode {
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
constructor(..._args) {
@@ -8507,7 +1451,7 @@ function getUntaintedPrototype(key) {
}
)
);
- if (isUntaintedAccessors && isUntaintedMethods) {
+ if (isUntaintedAccessors && isUntaintedMethods &&!isAngularZonePatchedFunction(defaultObj)) {
untaintedBasePrototype[key] = defaultObj.prototype;
return defaultObj.prototype;
}
@@ -11382,11 +4326,19 @@ class CanvasManager {
let rafId;
const getCanvas = () => {
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8d12dd

Please sign in to comment.