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

Unified Diff: src/utils.h

Issue 1559004: Fix the case of no words to copy. (Closed)
Patch Set: Created 10 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 | « src/builtins.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index ba27f07290b8f23803581e82ab295629fc03f1fc..b123057322403f53341a5f982de315d8e1756858 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -600,6 +600,8 @@ static inline void MemsetPointer(T** dest, T* value, int counter) {
// Copies data from |src| to |dst|. The data spans MUST not overlap.
inline void CopyWords(Object** dst, Object** src, int num_words) {
ASSERT(Min(dst, src) + num_words <= Max(dst, src));
+ ASSERT(num_words > 0);
+
// Use block copying memcpy if the segment we're copying is
// enough to justify the extra call/setup overhead.
static const int kBlockCopyLimit = 16;
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698