Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2122)

Unified Diff: src/runtime.cc

Issue 6723014: Avoid TLS access for counters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix lint Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/parser.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698