| Index: src/runtime/runtime-utils.h
|
| diff --git a/src/runtime/runtime-utils.h b/src/runtime/runtime-utils.h
|
| index c44e40208fda9ed8bb9fad5852995349ca89d480..20632e60b5262ed0281f6ac5314a53309eaa0c6f 100644
|
| --- a/src/runtime/runtime-utils.h
|
| +++ b/src/runtime/runtime-utils.h
|
| @@ -54,6 +54,17 @@ namespace internal {
|
| RUNTIME_ASSERT(args[index]->IsNumber()); \
|
| double name = args.number_at(index);
|
|
|
| +
|
| +// Cast the given argument to a size_t and store its value in a variable with
|
| +// the given name. If the argument is not a size_t call IllegalOperation and
|
| +// return.
|
| +#define CONVERT_SIZE_ARG_CHECKED(name, index) \
|
| + RUNTIME_ASSERT(args[index]->IsNumber()); \
|
| + Handle<Object> name##_object = args.at<Object>(index); \
|
| + size_t name = 0; \
|
| + RUNTIME_ASSERT(TryNumberToSize(isolate, *name##_object, &name));
|
| +
|
| +
|
| // Call the specified converter on the object *comand store the result in
|
| // a variable of the specified type with the given name. If the
|
| // object is not a Number call IllegalOperation and return.
|
|
|