Skip to content

Commit 70c4340

Browse files
hashseedCommit Bot
authored and
Commit Bot
committed
[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. [email protected], [email protected], [email protected] 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 <[email protected]> Commit-Queue: Yang Guo <[email protected]> Cr-Commit-Position: refs/heads/master@{#53861}
1 parent f318f98 commit 70c4340

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/api.cc

+4
Original file line numberDiff line numberDiff line change
@@ -10217,6 +10217,10 @@ const char* CodeEvent::GetCodeEventTypeName(CodeEventType code_event_type) {
1021710217
CODE_EVENTS_LIST(V)
1021810218
#undef V
1021910219
}
10220+
// The execution should never pass here
10221+
UNREACHABLE();
10222+
// NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9
10223+
return "Unknown";
1022010224
}
1022110225

1022210226
CodeEventHandler::CodeEventHandler(Isolate* isolate) {

src/log.cc

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ static v8::CodeEventType GetCodeEventTypeForTag(
5959
TAGS_LIST(V)
6060
#undef V
6161
}
62+
// The execution should never pass here
63+
UNREACHABLE();
64+
// NOTE(mmarchini): Workaround to fix a compiler failure on GCC 4.9
65+
return v8::CodeEventType::kUnknownType;
6266
}
6367
#define CALL_CODE_EVENT_HANDLER(Call) \
6468
if (listener_) { \

0 commit comments

Comments
 (0)