Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 01c0831b4ca5001950197e3931dc8a38a5d65889..87c1a31145e33c2cd3c78043a6815b602f61443c 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4584,12 +4584,14 @@ void JSObject::MigrateFastToSlow(Handle<JSObject> object, |
int new_instance_size = new_map->instance_size(); |
int instance_size_delta = map->instance_size() - new_instance_size; |
ASSERT(instance_size_delta >= 0); |
- Heap* heap = isolate->heap(); |
- heap->CreateFillerObjectAt(object->address() + new_instance_size, |
- instance_size_delta); |
- heap->AdjustLiveBytes(object->address(), |
- -instance_size_delta, |
- Heap::FROM_MUTATOR); |
+ |
+ if (instance_size_delta > 0) { |
+ Heap* heap = isolate->heap(); |
+ heap->CreateFillerObjectAt(object->address() + new_instance_size, |
+ instance_size_delta); |
+ heap->AdjustLiveBytes(object->address(), -instance_size_delta, |
+ Heap::FROM_MUTATOR); |
+ } |
// We are storing the new map using release store after creating a filler for |
// the left-over space to avoid races with the sweeper thread. |