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

Unified Diff: src/context-measure.cc

Issue 2780773002: [heap] Two minor fixes in EstimatedSize (Closed)
Patch Set: Remove unused variables Created 3 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 | « no previous file | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/context-measure.cc
diff --git a/src/context-measure.cc b/src/context-measure.cc
index 00c11eebc2cf40a548d16270c4173242f0e78322..a2bcae29853f45e5509322cd45e560d50be8b913 100644
--- a/src/context-measure.cc
+++ b/src/context-measure.cc
@@ -19,6 +19,8 @@ ContextMeasure::ContextMeasure(Context* context)
size_(0) {
DCHECK(context_->IsNativeContext());
Object* next_link = context_->next_context_link();
+ context_->set(Context::NEXT_CONTEXT_LINK,
+ context->GetIsolate()->heap()->undefined_value());
MeasureObject(context_);
MeasureDeferredObjects();
context_->set(Context::NEXT_CONTEXT_LINK, next_link);
@@ -32,6 +34,7 @@ bool ContextMeasure::IsShared(HeapObject* object) {
if (object->IsCode() && !Code::cast(object)->is_optimized_code()) return true;
if (object->IsAccessorInfo()) return true;
if (object->IsWeakCell()) return true;
+ if (object->IsMap()) return true;
Yang 2017/03/28 12:11:36 This is not the right thing to do. Most maps actua
Dan Ehrenberg 2017/03/28 16:51:06 Sorry for my confusion; of course they do. The new
return false;
}
« no previous file with comments | « no previous file | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698