Commit 272e26af authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

[api] Fix compilation error with gcc

enum values need to be explicitly casted to int type to
prevent the following error:
```
expects argument of type 'int', but argument 3 has type
'v8::internal::{anonymous}::V8StartupState'
```

Bug: v8:12309
Change-Id: I9515cde7d2496ca070ce4c6b751501236864730b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401398Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#78688}
parent 2afb952d
......@@ -70,14 +70,15 @@ void AdvanceStartupState(V8StartupState expected_next_state) {
// isolate->Dispose();
// v8::V8::Dispose();
// v8::V8::DisposePlatform();
FATAL("Wrong intialization order: got %d expected %d!", current_state,
next_state);
FATAL("Wrong intialization order: got %d expected %d!",
static_cast<int>(current_state), static_cast<int>(next_state));
}
if (!v8_startup_state_.compare_exchange_strong(current_state, next_state)) {
FATAL(
"Multiple threads are initializating V8 in the wrong order: expected "
"%d got %d!",
current_state, v8_startup_state_.load());
static_cast<int>(current_state),
static_cast<int>(v8_startup_state_.load()));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment