From: feng@chromium.org Date: Fri, 7 Aug 2009 18:17:01 +0000 (+0000) Subject: Avoid calling GC in Context::New on Android devices. X-Git-Tag: upstream/4.7.83~23491 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1005fa3fbcf1e864d238698d6a13b1842fafb182;p=platform%2Fupstream%2Fv8.git 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 --- 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;