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

Unified Diff: src/codegen.cc

Issue 6895014: Avoid hidden TLS access in CpuProfiler::is_profiling(). (Closed)
Patch Set: Created 9 years, 8 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 | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
diff --git a/src/codegen.cc b/src/codegen.cc
index 4bbe6ae26b40262a3d5610942c90d95720cd4732..6abd0e39a0783215c796d3bb993efce940fc7c62 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -176,7 +176,10 @@ static Vector<const char> kRegexp = CStrVector("regexp");
bool CodeGenerator::ShouldGenerateLog(Expression* type) {
ASSERT(type != NULL);
- if (!LOGGER->is_logging() && !CpuProfiler::is_profiling()) return false;
+ Isolate* isolate = Isolate::Current();
+ if (!isolate->logger()->is_logging() && !CpuProfiler::is_profiling(isolate)) {
+ return false;
+ }
Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
if (FLAG_log_regexp) {
if (name->IsEqualTo(kRegexp))
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698