Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 2ee41cb9b47540fd2d2c5c77cd981c46b8f7a7da..c4ac00fe9ee17f9827de995e7f758d556ed7d798 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -593,7 +593,7 @@ static MaybeObject* Runtime_CreateArrayLiteralShallow( |
} |
if (JSObject::cast(*boilerplate)->elements()->map() == |
isolate->heap()->fixed_cow_array_map()) { |
- COUNTERS->cow_arrays_created_runtime()->Increment(); |
+ isolate->counters()->cow_arrays_created_runtime()->Increment(); |
} |
return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate)); |
} |
@@ -12218,16 +12218,17 @@ const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
void Runtime::PerformGC(Object* result) { |
+ Isolate* isolate = Isolate::Current(); |
Failure* failure = Failure::cast(result); |
if (failure->IsRetryAfterGC()) { |
// Try to do a garbage collection; ignore it if it fails. The C |
// entry stub will throw an out-of-memory exception in that case. |
- HEAP->CollectGarbage(failure->allocation_space()); |
+ isolate->heap()->CollectGarbage(failure->allocation_space()); |
} else { |
// Handle last resort GC and make sure to allow future allocations |
// to grow the heap without causing GCs (if possible). |
- COUNTERS->gc_last_resort_from_js()->Increment(); |
- HEAP->CollectAllGarbage(false); |
+ isolate->counters()->gc_last_resort_from_js()->Increment(); |
+ isolate->heap()->CollectAllGarbage(false); |
} |
} |