Chromium Code Reviews| Index: src/type-info.cc |
| diff --git a/src/type-info.cc b/src/type-info.cc |
| index 99b1b3d899ecf4cf9e46f893356b8192ca8a7b7b..8efc222343f5a25498fb139c2f4eb3b6e5dfa004 100644 |
| --- a/src/type-info.cc |
| +++ b/src/type-info.cc |
| @@ -492,14 +492,10 @@ void TypeFeedbackOracle::ProcessRelocInfos(ZoneList<RelocInfo>* infos) { |
| void TypeFeedbackOracle::SetInfo(TypeFeedbackId ast_id, Object* target) { |
| ASSERT(dictionary_->FindEntry(IdToKey(ast_id)) == |
| UnseededNumberDictionary::kNotFound); |
| - MaybeObject* maybe_result = dictionary_->AtNumberPut(IdToKey(ast_id), target); |
| - USE(maybe_result); |
| -#ifdef DEBUG |
| - Object* result = NULL; |
| - // Dictionary has been allocated with sufficient size for all elements. |
|
Michael Starzinger
2014/04/07 12:27:56
nit: Can we preserve this comment above the Disall
|
| - ASSERT(maybe_result->ToObject(&result)); |
| - ASSERT(*dictionary_ == result); |
| -#endif |
| + DisallowHeapAllocation no_need_to_resize_dictionary; |
| + HandleScope scope(isolate()); |
| + isolate()->factory()->DictionaryAtNumberPut( |
| + dictionary_, IdToKey(ast_id), Handle<Object>(target, isolate())); |
|
Michael Starzinger
2014/04/07 12:27:56
nit: Using "handle(target, isolate())" is shorter.
|
| } |