Commit 1005fa3f authored by feng@chromium.org's avatar feng@chromium.org

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
parent e8f54a60
......@@ -2589,9 +2589,12 @@ Persistent<Context> v8::Context::New(
i::Handle<i::Context> 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<ObjectTemplate> proxy_template = global_template;
i::Handle<i::FunctionTemplateInfo> proxy_constructor;
i::Handle<i::FunctionTemplateInfo> global_constructor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment