Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Unified Diff: src/heap/heap.h

Issue 1035523005: Serializer: ensure unique script ids when deserializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ 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));
« no previous file with comments | « src/factory.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698