[weakref] Fix MaybeObject conversion in ObjectStats

Fixes the MaybeObject->Object conversion in ObjectStats to allow Smis,
rather than just HeapObjects.

Change-Id: I845613c47bb6ca696d444a025100b471fb385980
Reviewed-on: https://chromium-review.googlesource.com/1049925
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53070}
This commit is contained in:
Leszek Swirski 2018-05-08 13:41:52 +01:00 committed by Commit Bot
parent b1df16f832
commit fd9addd7e4

View File

@ -408,7 +408,7 @@ void ObjectStatsCollectorImpl::RecordVirtualJSObjectDetails(JSObject* object) {
static ObjectStats::VirtualInstanceType GetFeedbackSlotType( static ObjectStats::VirtualInstanceType GetFeedbackSlotType(
MaybeObject* maybe_obj, FeedbackSlotKind kind, Isolate* isolate) { MaybeObject* maybe_obj, FeedbackSlotKind kind, Isolate* isolate) {
HeapObject* obj = maybe_obj->ToStrongHeapObject(); Object* obj = maybe_obj->GetHeapObjectOrSmi();
switch (kind) { switch (kind) {
case FeedbackSlotKind::kCall: case FeedbackSlotKind::kCall:
if (obj == *isolate->factory()->uninitialized_symbol() || if (obj == *isolate->factory()->uninitialized_symbol() ||