| Index: runtime/vm/dart_api_impl.h
|
| diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
|
| index d61a3f8c55a9b0df91d7da90f582415161ee589e..013725c51daf68b17fd7e3492b519d5bc151d78d 100644
|
| --- a/runtime/vm/dart_api_impl.h
|
| +++ b/runtime/vm/dart_api_impl.h
|
| @@ -85,8 +85,12 @@ const char* CanonicalFunction(const char* func);
|
|
|
| #define RETURN_NULL_ERROR(parameter) \
|
| return Api::NewError("%s expects argument '%s' to be non-null.", \
|
| - CURRENT_FUNC, #parameter);
|
| + CURRENT_FUNC, #parameter)
|
|
|
| +#define CHECK_NULL(parameter) \
|
| + if (parameter == NULL) { \
|
| + RETURN_NULL_ERROR(parameter); \
|
| + }
|
|
|
| #define CHECK_LENGTH(length, max_elements) \
|
| do { \
|
|
|