Fix Windows compile error.
authorhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 10 Jul 2014 14:50:32 +0000 (14:50 +0000)
committerhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 10 Jul 2014 14:50:32 +0000 (14:50 +0000)
BUG=
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/386603003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/spaces.cc
src/spaces.h

index 4f4c68d..6ededac 100644 (file)
@@ -2578,14 +2578,15 @@ void PagedSpace::EvictEvacuationCandidatesFromFreeLists() {
 }
 
 
-HeapObject* PagedSpace::EnsureSweepingProgress(intptr_t size_in_bytes) {
+HeapObject* PagedSpace::EnsureSweepingProgress(int size_in_bytes) {
+  ASSERT(size_in_bytes >= 0);
   MarkCompactCollector* collector = heap()->mark_compact_collector();
 
   if (collector->IsConcurrentSweepingInProgress(this)) {
     // If sweeping is still in progress try to sweep pages on the main thread.
     intptr_t free_chunk =
         collector->SweepInParallel(this, size_in_bytes);
-    if (free_chunk >= size_in_bytes) {
+    if (free_chunk >= static_cast<intptr_t>(size_in_bytes)) {
       HeapObject* object = free_list_.Allocate(size_in_bytes);
       // We should be able to allocate an object here since we just freed that
       // much memory.
index dcb7769..8553598 100644 (file)
@@ -2017,7 +2017,7 @@ class PagedSpace : public Space {
   // If sweeping is still in progress try to sweep unswept pages. If that is
   // not successful, wait for the sweeper threads and re-try free-list
   // allocation.
-  MUST_USE_RESULT HeapObject* EnsureSweepingProgress(intptr_t size_in_bytes);
+  MUST_USE_RESULT HeapObject* EnsureSweepingProgress(int size_in_bytes);
 
   // Slow path of AllocateRaw.  This function is space-dependent.
   MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes);