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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 void accumulateSweepingTime(double time) { | 519 void accumulateSweepingTime(double time) { |
520 m_accumulatedSweepingTime += time; | 520 m_accumulatedSweepingTime += time; |
521 } | 521 } |
522 | 522 |
523 #if OS(WIN) && COMPILER(MSVC) | 523 #if OS(WIN) && COMPILER(MSVC) |
524 size_t threadStackSize(); | 524 size_t threadStackSize(); |
525 #endif | 525 #endif |
526 | 526 |
527 void freePersistentNode(PersistentNode*); | 527 void freePersistentNode(PersistentNode*); |
528 | 528 |
529 using PersistentClearCallback = void (*)(void*); | 529 enum ReleasePersistentMode { ClearPersistent, ReleasePersistent }; |
| 530 using PersistentClearCallback = void (*)(void*, ReleasePersistentMode); |
530 | 531 |
531 void registerStaticPersistentNode(PersistentNode*, PersistentClearCallback); | 532 void registerStaticPersistentNode(PersistentNode*, PersistentClearCallback); |
532 void releaseStaticPersistentNodes(); | |
533 | |
534 #if defined(LEAK_SANITIZER) | 533 #if defined(LEAK_SANITIZER) |
| 534 void clearStaticPersistentNodes(); |
535 void enterStaticReferenceRegistrationDisabledScope(); | 535 void enterStaticReferenceRegistrationDisabledScope(); |
536 void leaveStaticReferenceRegistrationDisabledScope(); | 536 void leaveStaticReferenceRegistrationDisabledScope(); |
537 #endif | 537 #endif |
| 538 void releaseStaticPersistentNodes(); |
538 | 539 |
539 void resetHeapCounters(); | 540 void resetHeapCounters(); |
540 void increaseAllocatedObjectSize(size_t); | 541 void increaseAllocatedObjectSize(size_t); |
541 void decreaseAllocatedObjectSize(size_t); | 542 void decreaseAllocatedObjectSize(size_t); |
542 void increaseMarkedObjectSize(size_t); | 543 void increaseMarkedObjectSize(size_t); |
543 | 544 |
544 void callThreadShutdownHooks(); | 545 void callThreadShutdownHooks(); |
545 | 546 |
546 v8::Isolate* isolate() const { return m_isolate; } | 547 v8::Isolate* isolate() const { return m_isolate; } |
547 | 548 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 class ThreadStateFor<AnyThread> { | 775 class ThreadStateFor<AnyThread> { |
775 STATIC_ONLY(ThreadStateFor); | 776 STATIC_ONLY(ThreadStateFor); |
776 | 777 |
777 public: | 778 public: |
778 static ThreadState* state() { return ThreadState::current(); } | 779 static ThreadState* state() { return ThreadState::current(); } |
779 }; | 780 }; |
780 | 781 |
781 } // namespace blink | 782 } // namespace blink |
782 | 783 |
783 #endif // ThreadState_h | 784 #endif // ThreadState_h |
OLD | NEW |