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

Unified Diff: src/serialize.cc

Issue 413663003: Add and move DisallowHeapAllocation scope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index 71bc363cf22830c65196df66c01e6eaeca603d3f..ebc453ccc2d3a61ab3c9f02a566ace8e7831f2f8 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -792,6 +792,8 @@ void Deserializer::DeserializePartial(Isolate* isolate, Object** root) {
external_reference_decoder_ = new ExternalReferenceDecoder(isolate);
}
+ DisallowHeapAllocation no_gc;
+
// Keep track of the code space start and end pointers in case new
// code objects were unserialized
OldSpace* code_space = isolate_->heap()->code_space();
@@ -1909,6 +1911,7 @@ ScriptData* CodeSerializer::Serialize(Isolate* isolate,
List<byte> payload;
ListSnapshotSink list_sink(&payload);
CodeSerializer cs(isolate, &list_sink, *source);
+ DisallowHeapAllocation no_gc;
Object** location = Handle<Object>::cast(info).location();
cs.VisitPointer(location);
cs.Pad();
@@ -2023,7 +2026,6 @@ Handle<SharedFunctionInfo> CodeSerializer::Deserialize(Isolate* isolate,
for (int i = NEW_SPACE; i <= PROPERTY_CELL_SPACE; i++) {
deserializer.set_reservation(i, scd.GetReservation(i));
}
- DisallowHeapAllocation no_gc;
// Prepare and register list of attached objects.
Vector<Object*> attached_objects = Vector<Object*>::New(1);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698