| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 if (isSweepingInProgress()) { | 906 if (isSweepingInProgress()) { |
| 907 setGCState(SweepingAndPreciseGCScheduled); | 907 setGCState(SweepingAndPreciseGCScheduled); |
| 908 return; | 908 return; |
| 909 } | 909 } |
| 910 | 910 |
| 911 setGCState(PreciseGCScheduled); | 911 setGCState(PreciseGCScheduled); |
| 912 } | 912 } |
| 913 | 913 |
| 914 namespace { | 914 namespace { |
| 915 | 915 |
| 916 #define UNEXPECTED_GCSTATE(s) \ | 916 #define UNEXPECTED_GCSTATE(s) \ |
| 917 case ThreadState::s: \ | 917 case ThreadState::s: \ |
| 918 RELEASE_NOTREACHED() << "Unexpected transition while in GCState " #s; \ | 918 LOG(FATAL) << "Unexpected transition while in GCState " #s; \ |
| 919 return | 919 return |
| 920 | 920 |
| 921 void unexpectedGCState(ThreadState::GCState gcState) { | 921 void unexpectedGCState(ThreadState::GCState gcState) { |
| 922 switch (gcState) { | 922 switch (gcState) { |
| 923 UNEXPECTED_GCSTATE(NoGCScheduled); | 923 UNEXPECTED_GCSTATE(NoGCScheduled); |
| 924 UNEXPECTED_GCSTATE(IdleGCScheduled); | 924 UNEXPECTED_GCSTATE(IdleGCScheduled); |
| 925 UNEXPECTED_GCSTATE(PreciseGCScheduled); | 925 UNEXPECTED_GCSTATE(PreciseGCScheduled); |
| 926 UNEXPECTED_GCSTATE(FullGCScheduled); | 926 UNEXPECTED_GCSTATE(FullGCScheduled); |
| 927 UNEXPECTED_GCSTATE(GCRunning); | 927 UNEXPECTED_GCSTATE(GCRunning); |
| 928 UNEXPECTED_GCSTATE(EagerSweepScheduled); | 928 UNEXPECTED_GCSTATE(EagerSweepScheduled); |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, | 1825 collectGarbage(BlinkGC::NoHeapPointersOnStack, BlinkGC::GCWithSweep, |
| 1826 BlinkGC::ForcedGC); | 1826 BlinkGC::ForcedGC); |
| 1827 size_t liveObjects = heap().heapStats().markedObjectSize(); | 1827 size_t liveObjects = heap().heapStats().markedObjectSize(); |
| 1828 if (liveObjects == previousLiveObjects) | 1828 if (liveObjects == previousLiveObjects) |
| 1829 break; | 1829 break; |
| 1830 previousLiveObjects = liveObjects; | 1830 previousLiveObjects = liveObjects; |
| 1831 } | 1831 } |
| 1832 } | 1832 } |
| 1833 | 1833 |
| 1834 } // namespace blink | 1834 } // namespace blink |
| OLD | NEW |