Merge pull request #14196 from nycdotnet/master

Revise Node.js definition to respond to feedback on PR #13877
This commit is contained in:
Daniel Rosenwasser
2017-01-23 13:20:15 -08:00
committed by GitHub
2 changed files with 18 additions and 4 deletions
+2 -4
View File
@@ -4016,10 +4016,8 @@ declare module "v8" {
physical_space_size: number;
}
enum DoesZapCodeSpaceFlag {
Disabled = 0,
Enabled = 1
}
//** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
type DoesZapCodeSpaceFlag = 0 | 1;
interface HeapInfo {
total_heap_size: number;
+16
View File
@@ -24,6 +24,7 @@ import * as string_decoder from "string_decoder";
import * as stream from "stream";
import * as timers from "timers";
import * as repl from "repl";
import * as v8 from "v8";
// Specifically test buffer module regression.
import {Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer} from "buffer";
@@ -2071,6 +2072,21 @@ namespace constants_tests {
str = constants.defaultCipherList
}
////////////////////////////////////////////////////
/// v8 tests : https://nodejs.org/api/v8.html
////////////////////////////////////////////////////
namespace v8_tests {
const heapStats = v8.getHeapStatistics();
const heapSpaceStats = v8.getHeapSpaceStatistics();
const zapsGarbage: number = heapStats.does_zap_garbage;
v8.setFlagsFromString('--collect_maps');
}
///////////////////////////////////////////////////////////
/// Debugger Tests ///
///////////////////////////////////////////////////////////