(obj)
| 1076 | // This would better be placed in internal/worker/io.js, but that doesn't work |
| 1077 | // because Buffer needs this and that would introduce a cyclic dependency. |
| 1078 | function markAsUntransferable(obj) { |
| 1079 | if ((typeof obj !== 'object' && typeof obj !== 'function') || obj === null) |
| 1080 | return; // This object is a primitive and therefore already untransferable. |
| 1081 | obj[untransferable_object_private_symbol] = true; |
| 1082 | |
| 1083 | if (isArrayBuffer(obj)) { |
| 1084 | setDetachKey(obj, kDetachKey); |
| 1085 | } |
| 1086 | } |
| 1087 | |
| 1088 | // This simply checks if the object is marked as untransferable and doesn't |
| 1089 | // check whether we are able to transfer it. |
no outgoing calls
no test coverage detected
searching dependent graphs…