| Index: src/runtime/runtime-utils.h
|
| diff --git a/src/runtime/runtime-utils.h b/src/runtime/runtime-utils.h
|
| index c673b5a1557d45d1cf9ee65b1728f113d0179b34..17c78d5a0b5ca5f4c2266b62f04e4c686f2ad4cd 100644
|
| --- a/src/runtime/runtime-utils.h
|
| +++ b/src/runtime/runtime-utils.h
|
| @@ -5,19 +5,49 @@
|
| #ifndef V8_RUNTIME_RUNTIME_UTILS_H_
|
| #define V8_RUNTIME_RUNTIME_UTILS_H_
|
|
|
| +#include "src/base/logging.h"
|
| #include "src/runtime/runtime.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -#define RUNTIME_ASSERT(value) \
|
| - if (!(value)) return isolate->ThrowIllegalOperation();
|
| +#ifdef DEBUG
|
| +
|
| +#define RUNTIME_ASSERT(value) \
|
| + do { \
|
| + if (!(value)) { \
|
| + V8_RuntimeError(__FILE__, __LINE__, #value); \
|
| + return isolate->ThrowIllegalOperation(); \
|
| + } \
|
| + } while (0)
|
| +
|
| +#define RUNTIME_ASSERT_HANDLIFIED(value, T) \
|
| + do { \
|
| + if (!(value)) { \
|
| + V8_RuntimeError(__FILE__, __LINE__, #value); \
|
| + isolate->ThrowIllegalOperation(); \
|
| + return MaybeHandle<T>(); \
|
| + } \
|
| + } while (0)
|
| +
|
| +#else
|
| +
|
| +#define RUNTIME_ASSERT(value) \
|
| + do { \
|
| + if (!(value)) { \
|
| + return isolate->ThrowIllegalOperation(); \
|
| + } \
|
| + } while (0)
|
|
|
| #define RUNTIME_ASSERT_HANDLIFIED(value, T) \
|
| - if (!(value)) { \
|
| - isolate->ThrowIllegalOperation(); \
|
| - return MaybeHandle<T>(); \
|
| - }
|
| + do { \
|
| + if (!(value)) { \
|
| + isolate->ThrowIllegalOperation(); \
|
| + return MaybeHandle<T>(); \
|
| + } \
|
| + } while (0)
|
| +
|
| +#endif
|
|
|
| // Cast the given object to a value of the specified type and store
|
| // it in a variable with the given name. If the object is not of the
|
|
|