Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 54d5f775acc5926426801a9c2e223ec2d494aff2..43d88edbbc551c5075302f861b337adeff0088b7 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -112,6 +112,12 @@ Handle<Code> CodeStub::GetCodeCopy(const Code::FindAndReplacePattern& pattern) { |
return ic; |
} |
+void CodeStub::DeleteStubFromCacheForTesting() { |
+ Heap* heap = isolate_->heap(); |
+ Handle<UnseededNumberDictionary> dict(heap->code_stubs()); |
+ dict = UnseededNumberDictionary::DeleteKey(dict, GetKey()); |
+ heap->SetRootCodeStubs(*dict); |
+} |
Handle<Code> PlatformCodeStub::GenerateCode() { |
Factory* factory = isolate()->factory(); |