Index: src/arm64/simulator-arm64.cc |
diff --git a/src/arm64/simulator-arm64.cc b/src/arm64/simulator-arm64.cc |
index 54ad4b08b29c65bb4c7a5d59c077bfd2a68f875d..0b1ba1d46b63120f1be3d388b14810db81ac9e2d 100644 |
--- a/src/arm64/simulator-arm64.cc |
+++ b/src/arm64/simulator-arm64.cc |
@@ -500,6 +500,14 @@ class Redirection { |
return redirection->external_function<void*>(); |
} |
+ static void DeleteChain(Redirection* redirection) { |
+ while (redirection != nullptr) { |
+ Redirection* next = redirection->next_; |
+ delete redirection; |
+ redirection = next; |
+ } |
+ } |
+ |
private: |
void* external_function_; |
Instruction redirect_call_; |
@@ -508,6 +516,12 @@ class Redirection { |
}; |
+// static |
+void Simulator::TearDown(HashMap* i_cache, Redirection* first) { |
+ Redirection::DeleteChain(first); |
+} |
+ |
+ |
// Calls into the V8 runtime are based on this very simple interface. |
// Note: To be able to return two values from some calls the code in runtime.cc |
// uses the ObjectPair structure. |