File tree 2 files changed +14
-5
lines changed
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,20 @@ added: v8.0.0
18
18
19
19
* Returns: {integer}
20
20
21
- Returns an integer representing a " version tag" derived from the V8 version,
22
- command-line flags and detected CPU features. This is useful for determining
21
+ Returns an integer representing a version tag derived from the V8 version,
22
+ command-line flags, and detected CPU features. This is useful for determining
23
23
whether a [ ` vm.Script ` ] [ ] ` cachedData ` buffer is compatible with this instance
24
24
of V8.
25
25
26
+ ``` js
27
+ console .log (v8 .cachedDataVersionTag ()); // 3947234607
28
+ // The value returned by v8.cachedDataVersionTag() is derived from the V8
29
+ // version, command-line flags, and detected CPU features. Test that the value
30
+ // does indeed update when flags are toggled.
31
+ v8 .setFlagsFromString (' --allow_natives_syntax' );
32
+ console .log (v8 .cachedDataVersionTag ()); // 183726201
33
+ ```
34
+
26
35
## ` v8.getHeapSpaceStatistics() `
27
36
<!-- YAML
28
37
added: v6.0.0
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ const versionTag1 = v8.cachedDataVersionTag();
7
7
assert . strictEqual ( typeof versionTag1 , 'number' ) ;
8
8
assert . strictEqual ( v8 . cachedDataVersionTag ( ) , versionTag1 ) ;
9
9
10
- // The value of cachedDataVersionTag is derived from the command line flags and
11
- // detected CPU features. Test that the value does indeed update when flags
12
- // are toggled.
10
+ // The value returned by v8. cachedDataVersionTag() is derived from the V8
11
+ // version, command-line flags, and detected CPU features. Test that the value
12
+ // does indeed update when flags are toggled.
13
13
v8 . setFlagsFromString ( '--allow_natives_syntax' ) ;
14
14
15
15
const versionTag2 = v8 . cachedDataVersionTag ( ) ;
You can’t perform that action at this time.
0 commit comments