diff --git a/common.gypi b/common.gypi index 1e6d9ac0b0fe0e..3b53721cd493e0 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.13', + 'v8_embedder_string': '-node.14', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/src/builtins/builtins-collections-gen.cc b/deps/v8/src/builtins/builtins-collections-gen.cc index 3cb20cd8df11a5..acb4c949ae11a8 100644 --- a/deps/v8/src/builtins/builtins-collections-gen.cc +++ b/deps/v8/src/builtins/builtins-collections-gen.cc @@ -302,10 +302,11 @@ TF_BUILTIN(MapConstructor, CollectionsBuiltinsAssembler) { BIND(&if_notobject); { - Node* const exception = MakeTypeError( - MessageTemplate::kIteratorValueNotAnObject, context, next_value); - var_exception.Bind(exception); - Goto(&if_exception); + Node* ret = CallRuntime( + Runtime::kThrowTypeError, context, + SmiConstant(MessageTemplate::kIteratorValueNotAnObject), next_value); + GotoIfException(ret, &if_exception, &var_exception); + Unreachable(); } } diff --git a/deps/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt b/deps/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt index b784fa549e3ba9..039b8bd9125f43 100644 --- a/deps/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt +++ b/deps/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt @@ -3,3 +3,9 @@ paused in throwCaught uncaught: false paused in throwUncaught uncaught: true +paused in throwInPromiseCaught +uncaught: false +paused in promiseUncaught +uncaught: true +paused in throwInMapConstructor +uncaught: true \ No newline at end of file diff --git a/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js b/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js index 38b622d3dba0ff..8789943a892572 100644 --- a/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js +++ b/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js @@ -7,6 +7,15 @@ let {session, contextGroup, Protocol} = InspectorTest.start("Check that inspecto contextGroup.addScript( `function throwCaught() { try { throw new Error(); } catch (_) {} } function throwUncaught() { throw new Error(); } + function throwInPromiseCaught() { + var reject; + new Promise(function(res, rej) { reject = rej; }).catch(() => {}); + reject(); + } + function throwInPromiseUncaught() { + new Promise(function promiseUncaught() { throw new Error(); }); + } + function throwInMapConstructor() { new Map('a'); } function schedule(f) { setTimeout(f, 0); } `); @@ -22,4 +31,10 @@ Protocol.Debugger.onPaused(message => { Protocol.Runtime.evaluate({ "expression": "schedule(throwCaught);" }) .then(() => Protocol.Runtime.evaluate( { "expression": "schedule(throwUncaught);" })) - .then(() => InspectorTest.completeTest()); + .then(() => Protocol.Runtime.evaluate( + { "expression": "schedule(throwInPromiseCaught);"})) + .then(() => Protocol.Runtime.evaluate( + { "expression": "schedule(throwInPromiseUncaught);"})) + .then(() => Protocol.Runtime.evaluate( + { "expression": "schedule(throwInMapConstructor);"})) + .then(() => InspectorTest.completeTest());