| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index a16e6fba05edbc7c63e16b54ca3d541531d85c43..8e395b328e1ad0cb09c0a1047e76d90822a4a326 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -1436,9 +1436,9 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
|
| int obj_size = Code::SizeFor(body_size);
|
|
|
| Handle<Code> code = NewCodeRaw(obj_size, immovable);
|
| - DCHECK(isolate()->code_range() == NULL ||
|
| - !isolate()->code_range()->valid() ||
|
| - isolate()->code_range()->contains(code->address()));
|
| + DCHECK(isolate()->code_range() == NULL || !isolate()->code_range()->valid() ||
|
| + isolate()->code_range()->contains(code->address()) ||
|
| + obj_size <= isolate()->heap()->code_space()->AreaSize());
|
|
|
| // The code object has not been fully initialized yet. We rely on the
|
| // fact that no allocation will happen from this point on.
|
|
|