From 1005fa3fbcf1e864d238698d6a13b1842fafb182 Mon Sep 17 00:00:00 2001 From: "feng@chromium.org" Date: Fri, 7 Aug 2009 18:17:01 +0000 Subject: [PATCH] Avoid calling GC in Context::New on Android devices. Review URL: http://codereview.chromium.org/164153 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/api.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api.cc b/src/api.cc index 0cbbb46..0f0d002 100644 --- a/src/api.cc +++ b/src/api.cc @@ -2589,9 +2589,12 @@ Persistent v8::Context::New( i::Handle env; { ENTER_V8; +#if defined(ANDROID) + // On mobile devices, full GC is expensive. +#else // Give the heap a chance to cleanup if we've disposed contexts. i::Heap::CollectAllGarbageIfContextDisposed(); - +#endif v8::Handle proxy_template = global_template; i::Handle proxy_constructor; i::Handle global_constructor; -- 2.7.4