| Index: src/global-handles.h
|
| diff --git a/src/global-handles.h b/src/global-handles.h
|
| index 50e5ed6969b0f9a8a113fb4fe62bc48335890c18..0e431ddf21ad1d4cc1451b0c013c945ef0fd5263 100644
|
| --- a/src/global-handles.h
|
| +++ b/src/global-handles.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef V8_GLOBAL_HANDLES_H_
|
| #define V8_GLOBAL_HANDLES_H_
|
|
|
| +#include <vector>
|
| +
|
| #include "include/v8.h"
|
| #include "include/v8-profiler.h"
|
|
|
| @@ -113,6 +115,8 @@ enum WeaknessType {
|
|
|
| class GlobalHandles {
|
| public:
|
| + enum IterationMode { HANDLE_PHANTOM_NODES, DONT_HANDLE_PHANTOM_NODES };
|
| +
|
| ~GlobalHandles();
|
|
|
| // Creates a new global handle that is alive until Destroy is called.
|
| @@ -227,6 +231,7 @@ class GlobalHandles {
|
|
|
| // Iterates over weak independent or unmodified handles.
|
| // See the note above.
|
| + template <IterationMode mode>
|
| void IterateNewSpaceWeakUnmodifiedRoots(ObjectVisitor* v);
|
|
|
| // Identify unmodified objects that are in weak state and marks them
|
| @@ -290,7 +295,13 @@ class GlobalHandles {
|
| #ifdef DEBUG
|
| void PrintStats();
|
| void Print();
|
| -#endif
|
| +#endif // DEBUG
|
| +
|
| +#ifdef VERIFY_HEAP
|
| + typedef std::vector<std::pair<void*, uint8_t>> NewSpaceNodeStates;
|
| + NewSpaceNodeStates GetNewSpaceNodeStates();
|
| + void RestoreNewSpaceNodeStates(const NewSpaceNodeStates& states);
|
| +#endif // VERIFY_HEAP
|
|
|
| private:
|
| explicit GlobalHandles(Isolate* isolate);
|
|
|