Index: src/list-inl.h |
diff --git a/src/list-inl.h b/src/list-inl.h |
index 5b5179d44c26f331f619762540020c8dd19f171f..34fa027370714b686f91a85269e578de4061f7dc 100644 |
--- a/src/list-inl.h |
+++ b/src/list-inl.h |
@@ -236,6 +236,19 @@ int SortedListBSearch(const List<T>& list, T elem) { |
return SortedListBSearch<T>(list, elem, PointerValueCompare<T>); |
} |
+ |
+template <class T> |
+List<T*>* UnwrapHandleList(List<T*>* destination, List<Handle<T> >* source) { |
+ ASSERT(destination->is_empty()); |
+ int length = source->length(); |
+ for (int i = 0; i < length; ++i) { |
+ Handle<T> handle = source->at(i); |
+ destination->Add(handle.is_null() ? NULL : *handle); |
+ } |
+ return destination; |
+} |
+ |
+ |
} } // namespace v8::internal |
#endif // V8_LIST_INL_H_ |