diff --git a/node.gyp b/node.gyp index bd50aecf522..a7b3ac33b24 100644 --- a/node.gyp +++ b/node.gyp @@ -1014,13 +1014,6 @@ 'include_dirs': [ 'deps/v8/include' ], - 'conditions' : [ - ['node_use_v8_platform=="true"', { - 'dependencies': [ - 'deps/v8/src/v8.gyp:v8_libplatform', - ], - }], - ] }], ['node_engine=="chakracore"', { 'include_dirs': [ diff --git a/src/node.cc b/src/node.cc index ba63c367963..edbdd49e106 100644 --- a/src/node.cc +++ b/src/node.cc @@ -64,7 +64,9 @@ #if NODE_USE_V8_PLATFORM #include "libplatform/libplatform.h" #endif // NODE_USE_V8_PLATFORM +#ifdef NODE_ENGINE_CHAKRACORE #include "v8-debug.h" +#endif #include "v8-profiler.h" #include "zlib.h" diff --git a/test/common/index.js b/test/common/index.js index b125314cd04..f0b7bcbb03d 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -605,16 +605,22 @@ exports.nodeProcessAborted = function nodeProcessAborted(exitCode, signal) { }; function areAllValuesStringEqual(obj) { - let exemplar; - for (const key of Object.keys(obj)) { - if (exemplar === undefined) { - exemplar = obj[key].toString(); - } else if (exemplar !== obj[key].toString()) { - return false; + try { + let exemplar; + for (const key of Object.keys(obj)) { + if (exemplar === undefined) { + exemplar = obj[key].toString(); + } else if (exemplar !== obj[key].toString()) { + return false; + } } - } - return true; + return true; + } catch (e) { + // If any exceptions are thrown just return false. They are likely due to + // symbols being used in the message object. + return false; + } } exports.engineSpecificMessage = function(messageObject) { @@ -635,6 +641,19 @@ exports.engineSpecificMessage = function(messageObject) { return undefined; }; +exports.requireInternalV8 = function() { + if (exports.isChakraEngine) { + return { + previewMapIterator: function() { return []; }, + previewSetIterator: function() { return []; }, + previewWeakMap: function() { return []; }, + previewWeakSet: function() { return []; } + }; + } else { + return require('internal/v8'); + } +}; + exports.busyLoop = function busyLoop(time) { const startTime = Timer.now(); const stopTime = startTime + time; diff --git a/test/es-module/es-module.status b/test/es-module/es-module.status index 055157d9012..b6e797652df 100644 --- a/test/es-module/es-module.status +++ b/test/es-module/es-module.status @@ -23,7 +23,6 @@ test-esm-loader-modulemap : SKIP test-esm-main-lookup : SKIP test-esm-named-exports : SKIP test-esm-namespace : SKIP -test-esm-ok : SKIP test-esm-preserve-symlinks : SKIP test-esm-preserve-symlinks-not-found : SKIP test-esm-preserve-symlinks-not-found-plain : SKIP diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 93d97337f5e..766da600fff 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -88,7 +88,6 @@ test-util : SKIP test-util-format-shared-arraybuffer : SKIP test-util-inspect-proxy : SKIP test-v8-serdes : SKIP -test-v8-serdes-sharedarraybuffer : SKIP test-vm-attributes-property-not-on-sandbox : SKIP test-vm-cached-data : SKIP test-vm-codegen : SKIP diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 10aa9412e83..a01bb0b884d 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -636,8 +636,7 @@ common.expectsError( type: assert.AssertionError, generatedMessage: !common.isChakraEngine, message: engineSpecificAssert( - `The expression evaluated to a falsy value:${EOL}${EOL} ` + - `assert.ok(null)${EOL}`, + `assert.ok(null)${EOL}`, 'null == true') } ); @@ -648,8 +647,7 @@ common.expectsError( type: assert.AssertionError, generatedMessage: !common.isChakraEngine, message: engineSpecificAssert( - `The expression evaluated to a falsy value:${EOL}${EOL} ` + - `assert(typeof 123 === 'string')${EOL}`, + `assert(typeof 123 === 'string')${EOL}`, 'false == true') } ); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 9359846252d..76d11139fdf 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -26,10 +26,7 @@ const assert = require('assert'); const JSStream = process.binding('js_stream').JSStream; const util = require('util'); const vm = require('vm'); -if (!common.isChakraEngine) { - // eslint-disable-next-line no-unused-vars - const { previewMapIterator } = require('internal/v8'); -} +const { previewMapIterator } = common.requireInternalV8(); assert.strictEqual(util.inspect(1), '1'); assert.strictEqual(util.inspect(false), 'false'); @@ -460,7 +457,6 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324'); if (!common.isChakraEngine) { const map = new Map(); map.set(1, 2); - // eslint-disable-next-line no-undef const vals = previewMapIterator(map.entries()); const valsOutput = []; for (const o of vals) {