Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Unified Diff: src/api.cc

Issue 661173: Add an explicit API entry to notify V8 that one or more... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | src/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
===================================================================
--- src/api.cc (revision 3959)
+++ src/api.cc (working copy)
@@ -2821,6 +2821,12 @@
}
+void v8::V8::ContextDisposedNotification() {
+ if (!i::V8::IsRunning()) return;
+ i::Heap::CollectAllGarbageIfContextDisposed(true);
+}
+
+
const char* v8::V8::GetVersion() {
static v8::internal::EmbeddedVector<char, 128> buffer;
v8::internal::Version::GetString(buffer);
@@ -2857,7 +2863,7 @@
// decide when should make a full GC.
#else
// Give the heap a chance to cleanup if we've disposed contexts.
- i::Heap::CollectAllGarbageIfContextDisposed();
+ i::Heap::CollectAllGarbageIfContextDisposed(false);
#endif
v8::Handle<ObjectTemplate> proxy_template = global_template;
i::Handle<i::FunctionTemplateInfo> proxy_constructor;
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698