Skip to content

Commit c8d6ff1

Browse files
Release build 4.29.0 [ci release]
1 parent f85fd15 commit c8d6ff1

23 files changed

+1196
-1111
lines changed

Sources/ContentScopeScripts/dist/contentScope.js

Lines changed: 137 additions & 129 deletions
Large diffs are not rendered by default.

Sources/ContentScopeScripts/dist/contentScopeIsolated.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,6 @@
55
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
66
const objectKeys = Object.keys;
77

8-
/* global cloneInto, exportFunction, false */
9-
// Tests don't define this variable so fallback to behave like chrome
10-
const functionToString = Function.prototype.toString;
11-
12-
/**
13-
* add a fake toString() method to a wrapper function to resemble the original function
14-
* @param {*} newFn
15-
* @param {*} origFn
16-
*/
17-
function wrapToString (newFn, origFn) {
18-
if (typeof newFn !== 'function' || typeof origFn !== 'function') {
19-
return
20-
}
21-
newFn.toString = function () {
22-
if (this === newFn) {
23-
return functionToString.call(origFn)
24-
} else {
25-
return functionToString.call(this)
26-
}
27-
};
28-
}
29-
308
/* global cloneInto, exportFunction, false */
319
let messageSecret;
3210

@@ -2103,12 +2081,13 @@
21032081

21042082
constructor () {
21052083
this.globals = {
2106-
window,
2107-
JSONparse: window.JSON.parse,
2108-
JSONstringify: window.JSON.stringify,
2109-
Promise: window.Promise,
2110-
Error: window.Error,
2111-
String: window.String
2084+
window: globalThis,
2085+
globalThis,
2086+
JSONparse: globalThis.JSON.parse,
2087+
JSONstringify: globalThis.JSON.stringify,
2088+
Promise: globalThis.Promise,
2089+
Error: globalThis.Error,
2090+
String: globalThis.String
21122091
};
21132092
}
21142093

@@ -2303,6 +2282,28 @@
23032282
return new Messaging(context, match())
23042283
}
23052284

2285+
/* global false */
2286+
// Tests don't define this variable so fallback to behave like chrome
2287+
const functionToString = Function.prototype.toString;
2288+
2289+
/**
2290+
* add a fake toString() method to a wrapper function to resemble the original function
2291+
* @param {*} newFn
2292+
* @param {*} origFn
2293+
*/
2294+
function wrapToString (newFn, origFn) {
2295+
if (typeof newFn !== 'function' || typeof origFn !== 'function') {
2296+
return
2297+
}
2298+
newFn.toString = function () {
2299+
if (this === newFn) {
2300+
return functionToString.call(origFn)
2301+
} else {
2302+
return functionToString.call(this)
2303+
}
2304+
};
2305+
}
2306+
23062307
/* global cloneInto, exportFunction */
23072308

23082309

@@ -2396,7 +2397,7 @@
23962397
get debugMessaging () {
23972398
if (this.#debugMessaging) return this.#debugMessaging
23982399

2399-
if (this.platform?.name === 'extension') {
2400+
if (this.platform?.name === 'extension' && typeof "apple-isolated" !== 'undefined') {
24002401
this.#debugMessaging = createMessaging({ name: 'debug', isDebug: this.isDebug }, "apple-isolated");
24012402
return this.#debugMessaging
24022403
} else {

0 commit comments

Comments
 (0)