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
This commit is contained in:
parent
e8f54a6073
commit
1005fa3fbc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user