| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 #endif | 322 #endif |
| 323 | 323 |
| 324 void didV8MajorGC(); | 324 void didV8MajorGC(); |
| 325 | 325 |
| 326 void performIdleGC(double deadlineSeconds); | 326 void performIdleGC(double deadlineSeconds); |
| 327 void performIdleLazySweep(double deadlineSeconds); | 327 void performIdleLazySweep(double deadlineSeconds); |
| 328 | 328 |
| 329 void scheduleIdleGC(); | 329 void scheduleIdleGC(); |
| 330 void scheduleIdleLazySweep(); | 330 void scheduleIdleLazySweep(); |
| 331 void schedulePreciseGC(); | 331 void schedulePreciseGC(); |
| 332 // estimatedRemovalRatio is the estimated ratio of objects that will be no |
| 333 // longer necessary due to the navigation. |
| 334 void schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio); |
| 332 void scheduleGCIfNeeded(); | 335 void scheduleGCIfNeeded(); |
| 333 void setGCState(GCState); | 336 void setGCState(GCState); |
| 334 GCState gcState() const; | 337 GCState gcState() const; |
| 335 bool isInGC() const { return gcState() == GCRunning; } | 338 bool isInGC() const { return gcState() == GCRunning; } |
| 336 bool isSweepingInProgress() const | 339 bool isSweepingInProgress() const |
| 337 { | 340 { |
| 338 return gcState() == Sweeping || gcState() == SweepingAndPreciseGCSchedul
ed || gcState() == SweepingAndIdleGCScheduled; | 341 return gcState() == Sweeping || gcState() == SweepingAndPreciseGCSchedul
ed || gcState() == SweepingAndIdleGCScheduled; |
| 339 } | 342 } |
| 340 | 343 |
| 341 // A GC runs in the following sequence. | 344 // A GC runs in the following sequence. |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 }; | 806 }; |
| 804 | 807 |
| 805 template<> class ThreadStateFor<AnyThread> { | 808 template<> class ThreadStateFor<AnyThread> { |
| 806 public: | 809 public: |
| 807 static ThreadState* state() { return ThreadState::current(); } | 810 static ThreadState* state() { return ThreadState::current(); } |
| 808 }; | 811 }; |
| 809 | 812 |
| 810 } // namespace blink | 813 } // namespace blink |
| 811 | 814 |
| 812 #endif // ThreadState_h | 815 #endif // ThreadState_h |
| OLD | NEW |