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

Unified Diff: content/child/content_child_helpers.cc

Issue 289033006: Don't try to access an Isolate when don't have one yet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/content_child_helpers.cc
diff --git a/content/child/content_child_helpers.cc b/content/child/content_child_helpers.cc
index bafd28f6ee9e8932cb965d879dbeeef60962a101..d6d62922d0229842a50a68434ba0e46aea951df1 100644
--- a/content/child/content_child_helpers.cc
+++ b/content/child/content_child_helpers.cc
@@ -29,7 +29,9 @@ size_t GetMemoryUsageKB() {
v8::HeapStatistics stat;
// TODO(svenpanne) The call below doesn't take web workers into account, this
// has to be done manually by iterating over all Isolates involved.
- v8::Isolate::GetCurrent()->GetHeapStatistics(&stat);
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ if (isolate)
+ isolate->GetHeapStatistics(&stat);
return mem_usage + (static_cast<uint64_t>(stat.total_heap_size()) >> 10);
}
#elif defined(OS_MACOSX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698