Commit 960a87bb authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[runtime] Remove RUNTIME_ASSERT_HANDLIFIED.

This removes the macro in question form the utility header. In the long
run we want to convert all RUNTIME_ASSERTs to CHECKs, now that runtime
functions are no longer fuzzed directly. This is just a first step.

R=bmeurer@chromium.org
BUG=v8:5066

Review-Url: https://codereview.chromium.org/2038013002
Cr-Commit-Position: refs/heads/master@{#36735}
parent 6ddd8314
......@@ -145,7 +145,7 @@ static MaybeHandle<JSArray> GetIteratorInternalProperties(
Isolate* isolate, Handle<IteratorType> object) {
Factory* factory = isolate->factory();
Handle<IteratorType> iterator = Handle<IteratorType>::cast(object);
RUNTIME_ASSERT_HANDLIFIED(iterator->kind()->IsSmi(), JSArray);
CHECK(iterator->kind()->IsSmi());
const char* kind = NULL;
switch (Smi::cast(iterator->kind())->value()) {
case IteratorType::kKindKeys:
......@@ -158,7 +158,7 @@ static MaybeHandle<JSArray> GetIteratorInternalProperties(
kind = "entries";
break;
default:
RUNTIME_ASSERT_HANDLIFIED(false, JSArray);
UNREACHABLE();
}
Handle<FixedArray> result = factory->NewFixedArray(2 * 3);
......@@ -248,7 +248,7 @@ MaybeHandle<JSArray> Runtime::GetInternalProperties(Isolate* isolate,
Handle<Object> status_obj =
DebugGetProperty(promise, isolate->factory()->promise_state_symbol());
RUNTIME_ASSERT_HANDLIFIED(status_obj->IsSmi(), JSArray);
CHECK(status_obj->IsSmi());
const char* status = "rejected";
int status_val = Handle<Smi>::cast(status_obj)->value();
switch (status_val) {
......
......@@ -300,9 +300,7 @@ MUST_USE_RESULT static MaybeHandle<AllocationSite> GetLiteralAllocationSite(
static MaybeHandle<JSObject> CreateArrayLiteralImpl(
Isolate* isolate, Handle<LiteralsArray> literals, int literals_index,
Handle<FixedArray> elements, int flags) {
RUNTIME_ASSERT_HANDLIFIED(
literals_index >= 0 && literals_index < literals->literals_count(),
JSObject);
CHECK(literals_index >= 0 && literals_index < literals->literals_count());
Handle<AllocationSite> site;
ASSIGN_RETURN_ON_EXCEPTION(
isolate, site,
......
......@@ -21,15 +21,6 @@ namespace internal {
} \
} 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) \
......@@ -39,14 +30,6 @@ namespace internal {
} \
} while (0)
#define RUNTIME_ASSERT_HANDLIFIED(value, 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment