diff options
author | svenpanne@chromium.org <svenpanne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 11:18:16 +0000 |
---|---|---|
committer | svenpanne@chromium.org <svenpanne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 11:18:16 +0000 |
commit | 94134c03f8770494c04df3a55e97617e2f91a862 (patch) | |
tree | 5654bbb04dae8e62ef5852c946df50867fa02880 /content | |
parent | 60dfffbd9285a14b932310697315a85589b1321f (diff) | |
download | chromium_src-94134c03f8770494c04df3a55e97617e2f91a862.zip chromium_src-94134c03f8770494c04df3a55e97617e2f91a862.tar.gz chromium_src-94134c03f8770494c04df3a55e97617e2f91a862.tar.bz2 |
Don't try to access an Isolate when don't have one yet.
BUG=373385
R=jochen@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/289033006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/child/content_child_helpers.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/content/child/content_child_helpers.cc b/content/child/content_child_helpers.cc index bafd28f..d6d6292 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) |