Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: adapt test-v8-flags to V8 9.3
%_IsSmi was removed. %IsSmi can be used instead.

Refs: v8/v8@863a2d6

PR-URL: #39469
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
targos committed Aug 30, 2021
commit fa15ebaadbacc478122ef944faec2c89605be7b3
8 changes: 4 additions & 4 deletions test/parallel/test-v8-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const vm = require('vm');
// Specifically here, V8 may cache compiled scripts between the flip of the
// flag. We use a different script each time to work around this problem.
v8.setFlagsFromString('--allow_natives_syntax');
assert(eval('%_IsSmi(42)'));
assert(vm.runInThisContext('%_IsSmi(43)'));
assert(eval('%IsSmi(42)'));
assert(vm.runInThisContext('%IsSmi(43)'));

v8.setFlagsFromString('--noallow_natives_syntax');
assert.throws(function() { eval('%_IsSmi(44)'); },
assert.throws(function() { eval('%IsSmi(44)'); },
/^SyntaxError: Unexpected token '%'$/);
assert.throws(function() { vm.runInThisContext('%_IsSmi(45)'); },
assert.throws(function() { vm.runInThisContext('%IsSmi(45)'); },
/^SyntaxError: Unexpected token '%'$/);