Reviewers: Rico,
Description:
Make some runtime arguments checks be RUNTIME_ASSERT, not ASSERT.
Please review this at http://codereview.chromium.org/3411013/show
Affected files:
M src/runtime.cc
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
a5a85ff251342b959fae0f5115cca168ab8f7727..c0b6b1fdf0411230da67ac58f91603947416cf99
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -946,7 +946,7 @@ static Object* Runtime_DeclareContextSlot(Arguments
args) {
Handle<String> name(String::cast(args[1]));
PropertyAttributes mode =
static_cast<PropertyAttributes>(Smi::cast(args[2])->value());
- ASSERT(mode == READ_ONLY || mode == NONE);
+ RUNTIME_ASSERT(mode == READ_ONLY || mode == NONE);
Handle<Object> initial_value(args[3]);
// Declarations are always done in the function context.
@@ -8950,8 +8950,8 @@ static Object* Runtime_ClearBreakPoint(Arguments
args) {
static Object* Runtime_ChangeBreakOnException(Arguments args) {
HandleScope scope;
ASSERT(args.length() == 2);
- ASSERT(args[0]->IsNumber());
- ASSERT(args[1]->IsBoolean());
+ RUNTIME_ASSERT(args[0]->IsNumber());
+ RUNTIME_ASSERT(args[1]->IsBoolean());
// Update break point state
ExceptionBreakType type =
@@ -8967,7 +8967,7 @@ static Object*
Runtime_ChangeBreakOnException(Arguments args) {
static Object* Runtime_IsBreakOnException(Arguments args) {
HandleScope scope;
ASSERT(args.length() == 1);
- ASSERT(args[0]->IsNumber());
+ RUNTIME_ASSERT(args[0]->IsNumber());
ExceptionBreakType type =
static_cast<ExceptionBreakType>(NumberToUint32(args[0]));
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev