forked from firka/flutter
Handle Windows headers defining ERROR to 0 in log levels. (flutter/engine#6677)
This commit is contained in:
@@ -7,10 +7,6 @@
|
||||
#include "flutter/assets/directory_asset_bundle.h"
|
||||
#include "flutter/fml/trace_event.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace blink {
|
||||
|
||||
AssetManager::AssetManager() = default;
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
#include "flutter/flow/layers/platform_view_layer.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace flow {
|
||||
|
||||
PlatformViewLayer::PlatformViewLayer() = default;
|
||||
|
||||
@@ -16,6 +16,13 @@ constexpr LogSeverity LOG_ERROR = 2;
|
||||
constexpr LogSeverity LOG_FATAL = 3;
|
||||
constexpr LogSeverity LOG_NUM_SEVERITIES = 4;
|
||||
|
||||
// One of the Windows headers defines ERROR to 0. This makes the token
|
||||
// concatenation in FML_LOG(ERROR) to resolve to LOG_0. We define this back to
|
||||
// the appropriate log level.
|
||||
#ifdef _WIN32
|
||||
#define LOG_0 LOG_ERROR
|
||||
#endif
|
||||
|
||||
// LOG_DFATAL is LOG_FATAL in debug mode, ERROR in normal mode
|
||||
#ifdef NDEBUG
|
||||
const LogSeverity LOG_DFATAL = LOG_ERROR;
|
||||
|
||||
@@ -17,10 +17,6 @@
|
||||
#include "third_party/tonic/logging/dart_invoke.h"
|
||||
#include "third_party/tonic/typed_data/uint8_list.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
using tonic::DartInvoke;
|
||||
using tonic::DartPersistentValue;
|
||||
using tonic::ToDart;
|
||||
|
||||
@@ -25,10 +25,6 @@ using tonic::DartInvoke;
|
||||
using tonic::DartPersistentValue;
|
||||
using tonic::ToDart;
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace blink {
|
||||
namespace {
|
||||
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
#include "third_party/tonic/scopes/dart_api_scope.h"
|
||||
#include "third_party/tonic/scopes/dart_isolate_scope.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace blink {
|
||||
|
||||
std::weak_ptr<DartIsolate> DartIsolate::CreateRootIsolate(
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
#include "third_party/tonic/scopes/dart_api_scope.h"
|
||||
#include "third_party/tonic/typed_data/uint8_list.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace dart {
|
||||
namespace observatory {
|
||||
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
#include "flutter/runtime/runtime_delegate.h"
|
||||
#include "third_party/tonic/dart_message_handler.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace blink {
|
||||
|
||||
RuntimeController::RuntimeController(
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
#include "third_party/skia/include/core/SkPictureRecorder.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
static constexpr char kAssetChannel[] = "flutter/assets";
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
#include "flutter/fml/make_copyable.h"
|
||||
#include "flutter/runtime/dart_vm.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
IsolateConfiguration::IsolateConfiguration() = default;
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
#include "third_party/skia/include/core/SkSurfaceCharacterization.h"
|
||||
#include "third_party/skia/include/utils/SkBase64.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
Rasterizer::Rasterizer(blink::TaskRunners task_runners)
|
||||
|
||||
@@ -31,10 +31,6 @@
|
||||
#include "third_party/skia/include/core/SkGraphics.h"
|
||||
#include "third_party/tonic/common/log.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
std::unique_ptr<Shell> Shell::CreateShellOnPlatformThread(
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
#define GPU_GL_RGB565 0x8D62
|
||||
#define GPU_GL_VERSION 0x1F02
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
// Default maximum number of budgeted resources in the cache.
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
|
||||
#include "flutter/fml/make_copyable.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
EmbedderEngine::EmbedderEngine(
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
|
||||
#include "flutter/shell/common/io_manager.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
EmbedderSurfaceGL::EmbedderSurfaceGL(GLDispatchTable gl_dispatch_table,
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
#include "flutter/fml/trace_event.h"
|
||||
#include "third_party/skia/include/gpu/GrContext.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
EmbedderSurfaceSoftware::EmbedderSurfaceSoftware(
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
#include "flutter/shell/platform/embedder/platform_view_embedder.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
PlatformViewEmbedder::PlatformViewEmbedder(
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
#include "flutter/shell/common/thread_host.h"
|
||||
#include "third_party/dart/runtime/include/bin/dart_io_api.h"
|
||||
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
namespace shell {
|
||||
|
||||
// Checks whether the engine's main Dart isolate has no pending work. If so,
|
||||
|
||||
Reference in New Issue
Block a user