Reviewers: Michael Starzinger,

Description:
Handlify TypeFeedbackOracle::SetInfo.

[email protected]

Please review this at https://codereview.chromium.org/226623007/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -8 lines):
  M src/type-info.cc


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.
-  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()));
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to