Chromium Code Reviews| Index: src/heap/heap.h |
| diff --git a/src/heap/heap.h b/src/heap/heap.h |
| index 5c276e9581c5fa2aac11a33db53cd7dd96a444b5..8e4952e8a83fb5e2d577a42f50eef38af99c16e9 100644 |
| --- a/src/heap/heap.h |
| +++ b/src/heap/heap.h |
| @@ -1349,6 +1349,14 @@ class Heap { |
| return seed; |
| } |
| + Smi* NextScriptId() { |
| + int next_id = last_script_id()->value() + 1; |
| + if (!Smi::IsValid(next_id) || next_id < 0) next_id = 1; |
|
jochen (gone - plz use gerrit)
2015/03/26 08:00:22
when this happens, we're in trouble, right? maybe
|
| + Smi* next_id_smi = Smi::FromInt(next_id); |
| + set_last_script_id(next_id_smi); |
| + return next_id_smi; |
| + } |
| + |
| void SetArgumentsAdaptorDeoptPCOffset(int pc_offset) { |
| DCHECK(arguments_adaptor_deopt_pc_offset() == Smi::FromInt(0)); |
| set_arguments_adaptor_deopt_pc_offset(Smi::FromInt(pc_offset)); |