From 3afffebb5b818e76cf461d96e1b546655d8896da Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Thu, 21 Jun 2018 08:39:49 -0700 Subject: [PATCH] deps: cherry-pick 70c4340 from upstream V8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [log][api] Fix GCC 4.9 build failure GCC 4.9 used on some Node.js CI machines complains when the control reaches the end of a non-void function and no return is encountered. R=bmeurer@google.com, ofrobots@google.com, yangguo@google.com Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: I5af0192cb187eccbf34dbb60ff3ac2e4774af803 Reviewed-on: https://chromium-review.googlesource.com/1105619 Reviewed-by: Yang Guo Commit-Queue: Yang Guo Cr-Commit-Position: refs/heads/master@{#53861} Refs: https://github.com/v8/v8/commit/70c43402ee04d482ff64e186e2faf43fe Backport-PR-URL: https://github.com/nodejs/node/pull/21668 PR-URL: https://github.com/nodejs/node/pull/21126 Refs: https://github.com/v8/v8/commit/aa6ce3e Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- common.gypi | 2 +- deps/v8/src/api.cc | 4 ++++ deps/v8/src/log.cc | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 97510abf5bd691..ee0d276971b2f3 100644 --- a/common.gypi +++ b/common.gypi @@ -29,7 +29,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.5', + 'v8_embedder_string': '-node.6', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index f51576ed2a6132..34b4773c2f495d 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -10148,6 +10148,10 @@ const char* CodeEvent::GetCodeEventTypeName(CodeEventType code_event_type) { CODE_EVENTS_LIST(V) #undef V } + // The execution should never pass here + UNREACHABLE(); + // NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9 + return "Unknown"; } CodeEventHandler::CodeEventHandler(Isolate* isolate) { diff --git a/deps/v8/src/log.cc b/deps/v8/src/log.cc index f46f849b4d0295..fb3b4761a34e78 100644 --- a/deps/v8/src/log.cc +++ b/deps/v8/src/log.cc @@ -59,6 +59,10 @@ static v8::CodeEventType GetCodeEventTypeForTag( TAGS_LIST(V) #undef V } + // The execution should never pass here + UNREACHABLE(); + // NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9 + return v8::CodeEventType::kUnknownType; } #define CALL_CODE_EVENT_HANDLER(Call) \ if (listener_) { \