File tree Expand file tree Collapse file tree 3 files changed +6
-53
lines changed Expand file tree Collapse file tree 3 files changed +6
-53
lines changed Original file line number Diff line number Diff line change @@ -310,8 +310,6 @@ let knownGlobals = [
310310 clearImmediate ,
311311 clearInterval ,
312312 clearTimeout ,
313- console ,
314- constructor , // Enumerable in V8 3.21.
315313 global ,
316314 process ,
317315 setImmediate ,
@@ -341,29 +339,6 @@ if (global.COUNTER_NET_SERVER_CONNECTION) {
341339 knownGlobals . push ( COUNTER_HTTP_CLIENT_RESPONSE ) ;
342340}
343341
344- if ( global . ArrayBuffer ) {
345- knownGlobals . push ( ArrayBuffer ) ;
346- knownGlobals . push ( Int8Array ) ;
347- knownGlobals . push ( Uint8Array ) ;
348- knownGlobals . push ( Uint8ClampedArray ) ;
349- knownGlobals . push ( Int16Array ) ;
350- knownGlobals . push ( Uint16Array ) ;
351- knownGlobals . push ( Int32Array ) ;
352- knownGlobals . push ( Uint32Array ) ;
353- knownGlobals . push ( Float32Array ) ;
354- knownGlobals . push ( Float64Array ) ;
355- knownGlobals . push ( DataView ) ;
356- }
357-
358- // Harmony features.
359- if ( global . Proxy ) {
360- knownGlobals . push ( Proxy ) ;
361- }
362-
363- if ( global . Symbol ) {
364- knownGlobals . push ( Symbol ) ;
365- }
366-
367342if ( process . env . NODE_TEST_KNOWN_GLOBALS ) {
368343 const knownFromEnv = process . env . NODE_TEST_KNOWN_GLOBALS . split ( ',' ) ;
369344 allowGlobals ( ...knownFromEnv ) ;
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ let knownGlobals = [
88 clearImmediate ,
99 clearInterval ,
1010 clearTimeout ,
11- console ,
12- constructor , // Enumerable in V8 3.21.
1311 global ,
1412 process ,
1513 setImmediate ,
@@ -50,29 +48,6 @@ export function leakedGlobals() {
5048 knownGlobals . push ( COUNTER_HTTP_CLIENT_RESPONSE ) ;
5149 }
5250
53- if ( global . ArrayBuffer ) {
54- knownGlobals . push ( ArrayBuffer ) ;
55- knownGlobals . push ( Int8Array ) ;
56- knownGlobals . push ( Uint8Array ) ;
57- knownGlobals . push ( Uint8ClampedArray ) ;
58- knownGlobals . push ( Int16Array ) ;
59- knownGlobals . push ( Uint16Array ) ;
60- knownGlobals . push ( Int32Array ) ;
61- knownGlobals . push ( Uint32Array ) ;
62- knownGlobals . push ( Float32Array ) ;
63- knownGlobals . push ( Float64Array ) ;
64- knownGlobals . push ( DataView ) ;
65- }
66-
67- // Harmony features.
68- if ( global . Proxy ) {
69- knownGlobals . push ( Proxy ) ;
70- }
71-
72- if ( global . Symbol ) {
73- knownGlobals . push ( Symbol ) ;
74- }
75-
7651 const leaked = [ ] ;
7752
7853 for ( const val in global ) {
Original file line number Diff line number Diff line change 11'use strict' ;
2- // copy console accessor because requiring ../common touches it
2+ // Copy console accessor because requiring ../common touches it
33const consoleDescriptor = Object . getOwnPropertyDescriptor ( global , 'console' ) ;
4- delete global . console ;
5- global . console = { } ;
4+ Object . defineProperty ( global , 'console' , {
5+ configurable : true ,
6+ writable : true ,
7+ value : { }
8+ } ) ;
69
710require ( '../common' ) ;
811
You can’t perform that action at this time.
0 commit comments