Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
index 9ad69b6a76d7143d461e7cd40a8339f4c8375f84..5dade81422fb90875c853471da1f73fa91d9e779 100644 |
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
@@ -709,6 +709,10 @@ void ThreadState::scheduleGCIfNeeded() |
if (isGCForbidden()) |
return; |
+ if (isSweepingInProgress()) |
+ return; |
+ ASSERT(!sweepForbidden()); |
+ |
if (shouldForceMemoryPressureGC()) { |
completeSweep(); |
if (shouldForceMemoryPressureGC()) { |
@@ -720,10 +724,6 @@ void ThreadState::scheduleGCIfNeeded() |
} |
} |
- if (isSweepingInProgress()) |
- return; |
- ASSERT(!sweepForbidden()); |
- |
if (shouldForceConservativeGC()) { |
completeSweep(); |
if (shouldForceConservativeGC()) { |