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

Unified Diff: runtime/bin/dartutils.h

Issue 297183003: Reduce CPU usage when no isolates need to be profiled. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « no previous file | runtime/bin/process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.h
diff --git a/runtime/bin/dartutils.h b/runtime/bin/dartutils.h
index 4175eb560803c1b731fce930c7a37d9b40467297..ed53fab2ef5523b7546eaf53ff14e22f692a4686 100644
--- a/runtime/bin/dartutils.h
+++ b/runtime/bin/dartutils.h
@@ -542,6 +542,18 @@ class CObjectExternalUint8Array : public CObject {
DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array);
};
+
+class ScopedBlockingCall {
+ public:
+ ScopedBlockingCall() {
+ Dart_IsolateBlocked();
+ }
+
+ ~ScopedBlockingCall() {
+ Dart_IsolateUnblocked();
+ }
+};
+
} // namespace bin
} // namespace dart
« no previous file with comments | « no previous file | runtime/bin/process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698