Files
atom/Atom-Linux/util.h
Corey Johnson & Nathan Sobo 27d2d14414 Carry CEF1 directories over to CEF3
2012-08-31 10:43:21 -07:00

23 lines
642 B
C

// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef UTIL_H_
#define UTIL_H_
#pragma once
#include "include/cef_task.h"
#include <assert.h> // NOLINT(build/include_order)
#ifndef NDEBUG
#define ASSERT(condition) if (!(condition)) { assert(false); }
#else
#define ASSERT(condition) ((void)0)
#endif
#define REQUIRE_UI_THREAD() ASSERT(CefCurrentlyOn(TID_UI));
#define REQUIRE_IO_THREAD() ASSERT(CefCurrentlyOn(TID_IO));
#define REQUIRE_FILE_THREAD() ASSERT(CefCurrentlyOn(TID_FILE));
#endif