Ensure isolate exists in ReportApiFailure
This avoids a segfault rather than reporting the (API usage) error message: "Fatal error in v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope" Bug: Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I68a3d77ca37cc09d9e70526008a072dee8973000 Reviewed-on: https://chromium-review.googlesource.com/832488 Commit-Queue: Wael Al Jishi <waelj@google.com> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#50485}
This commit is contained in:
parent
ff0abec84c
commit
73253d428c
@ -402,7 +402,10 @@ void i::V8::FatalProcessOutOfMemory(const char* location, bool is_heap_oom) {
|
||||
|
||||
void Utils::ReportApiFailure(const char* location, const char* message) {
|
||||
i::Isolate* isolate = i::Isolate::Current();
|
||||
FatalErrorCallback callback = isolate->exception_behavior();
|
||||
FatalErrorCallback callback = nullptr;
|
||||
if (isolate != nullptr) {
|
||||
callback = isolate->exception_behavior();
|
||||
}
|
||||
if (callback == nullptr) {
|
||||
base::OS::PrintError("\n#\n# Fatal error in %s\n# %s\n#\n\n", location,
|
||||
message);
|
||||
|
Loading…
Reference in New Issue
Block a user