Skip to content

Commit 3e4a37f

Browse files
authored
Merge pull request #833 from MarkTiedemann/add-text-encoding-globals
Add WHATWG Encoding API globals
2 parents 850354a + b9d1a92 commit 3e4a37f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/leaks.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,18 @@ exports.detect = function (customGlobals) {
121121
}
122122
// $lab:coverage:on$
123123

124+
// $lab:coverage:off$
125+
if (global.TextEncoder) {
126+
whitelist.TextEncoder = true;
127+
}
128+
// $lab:coverage:on$
129+
130+
// $lab:coverage:off$
131+
if (global.TextDecoder) {
132+
whitelist.TextDecoder = true;
133+
}
134+
// $lab:coverage:on$
135+
124136
if (global.DTRACE_HTTP_SERVER_RESPONSE) {
125137
whitelist.DTRACE_HTTP_SERVER_RESPONSE = true;
126138
whitelist.DTRACE_HTTP_SERVER_REQUEST = true;

0 commit comments

Comments
 (0)