v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
logging.cc
Go to the documentation of this file.
1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
7
8#include "src/base/logging.h"
9
10namespace cppgc {
11namespace internal {
12
13void DCheckImpl(const char* message, const SourceLocation& loc) {
14 V8_Dcheck(loc.FileName(), static_cast<int>(loc.Line()), message);
15}
16
17void FatalImpl(const char* message, const SourceLocation& loc) {
18#if DEBUG
19 V8_Fatal(loc.FileName(), static_cast<int>(loc.Line()), "Check failed: %s.",
20 message);
21#elif !defined(OFFICIAL_BUILD)
22 V8_Fatal("Check failed: %s.", message);
23#else
24 V8_Fatal("ignored");
25#endif
26}
27
28} // namespace internal
29} // namespace cppgc
void V8_Fatal(const char *format,...)
Definition logging.cc:170
void V8_Dcheck(const char *file, int line, const char *message)
Definition logging.cc:218
constexpr size_t Line() const
constexpr const char * FileName() const
void DCheckImpl(const char *message, const SourceLocation &loc)
Definition logging.cc:13
void FatalImpl(const char *message, const SourceLocation &loc)
Definition logging.cc:17