Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 117b3b12d80094f97ebd71803ed1e3f043f6af33..276c87ebd00a227f162ed93cf81770ddcce05830 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -37,11 +37,11 @@ |
namespace v8 { |
namespace internal { |
-bool CodeStub::FindCodeInCache(Code** code_out) { |
- Heap* heap = Isolate::Current()->heap(); |
- int index = heap->code_stubs()->FindEntry(GetKey()); |
+bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) { |
+ UnseededNumberDictionary* stubs = isolate->heap()->code_stubs(); |
+ int index = stubs->FindEntry(GetKey()); |
if (index != UnseededNumberDictionary::kNotFound) { |
- *code_out = Code::cast(heap->code_stubs()->ValueAt(index)); |
+ *code_out = Code::cast(stubs->ValueAt(index)); |
return true; |
} |
return false; |
@@ -93,8 +93,8 @@ Handle<Code> CodeStub::GetCode() { |
Heap* heap = isolate->heap(); |
Code* code; |
if (UseSpecialCache() |
- ? FindCodeInSpecialCache(&code) |
- : FindCodeInCache(&code)) { |
+ ? FindCodeInSpecialCache(&code, isolate) |
+ : FindCodeInCache(&code, isolate)) { |
ASSERT(IsPregenerated() == code->is_pregenerated()); |
return Handle<Code>(code); |
} |
@@ -297,8 +297,7 @@ void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) { |
} |
-bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) { |
- Isolate* isolate = known_map_->GetIsolate(); |
+bool ICCompareStub::FindCodeInSpecialCache(Code** code_out, Isolate* isolate) { |
Factory* factory = isolate->factory(); |
Code::Flags flags = Code::ComputeFlags( |
static_cast<Code::Kind>(GetCodeKind()), |