Merge pull request #11182 from Snuffleupagus/disableWorker-disable-Dict-postMessage
Forbid sending of `Dict`s and `Stream`s, with `postMessage`, when workers are disabled
This commit is contained in:
commit
8c4f4b5eec
@ -1463,8 +1463,14 @@ class LoopbackPort {
|
||||
while (!(desc = Object.getOwnPropertyDescriptor(p, i))) {
|
||||
p = Object.getPrototypeOf(p);
|
||||
}
|
||||
if (typeof desc.value === 'undefined' ||
|
||||
typeof desc.value === 'function') {
|
||||
if (typeof desc.value === 'undefined') {
|
||||
continue;
|
||||
}
|
||||
if (typeof desc.value === 'function') {
|
||||
if (value.hasOwnProperty && value.hasOwnProperty(i)) {
|
||||
throw new Error(
|
||||
`LoopbackPort.postMessage - cannot clone: ${value[i]}`);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
result[i] = cloneValue(desc.value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user