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

Unified Diff: src/isolate.cc

Issue 29053002: Provide a mechanism for the embedder to set a TotalPhysicalMemory callback function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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
« src/api.cc ('K') | « src/isolate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 29ead298196a765e8ca856628bf301ef7d263a8a..47a795aa185d21c5aa48fdd98c19fcf9f6d27d22 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -102,6 +102,7 @@ void ThreadLocalTop::InitializeInternal() {
thread_id_ = ThreadId::Invalid();
external_caught_exception_ = false;
failed_access_check_callback_ = NULL;
+ total_physical_memory_callback_ = NULL;
save_context_ = NULL;
catcher_ = NULL;
top_lookup_result_ = NULL;
@@ -962,6 +963,12 @@ void Isolate::ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type) {
}
+void Isolate::SetTotalPhysicalMemoryCallback(
+ v8::TotalPhysicalMemoryCallback callback) {
+ thread_local_top()->total_physical_memory_callback_ = callback;
+}
+
+
enum MayAccessDecision {
YES, NO, UNKNOWN
};
« src/api.cc ('K') | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698