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

Unified Diff: src/api.cc

Issue 412163003: Move gc notifications from V8 to Isolate and make idle hint mandatory (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index ddc57f26d1b12c39e4ea0d0f139d39f94d4c183a..0fcae28294bd86c2f95866b67725ac058a540e95 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6712,6 +6712,27 @@ void Isolate::SetAddHistogramSampleFunction(
}
+bool v8::Isolate::IdleNotification(int idle_time_in_ms) {
+ // Returning true tells the caller that it need not
+ // continue to call IdleNotification.
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ if (!i::FLAG_use_idle_notification) return true;
+ return isolate->heap()->IdleNotification(idle_time_in_ms);
+}
+
+
+void v8::Isolate::LowMemoryNotification() {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ isolate->heap()->CollectAllAvailableGarbage("low memory notification");
+}
+
+
+int v8::Isolate::ContextDisposedNotification() {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ return isolate->heap()->NotifyContextDisposed();
+}
+
+
String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj)
: str_(NULL), length_(0) {
i::Isolate* isolate = i::Isolate::Current();
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698