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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_DARTUTILS_H_ 5 #ifndef BIN_DARTUTILS_H_
6 #define BIN_DARTUTILS_H_ 6 #define BIN_DARTUTILS_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 10
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 uint8_t* Data() const { return cobject_->value.as_external_typed_data.data; } 535 uint8_t* Data() const { return cobject_->value.as_external_typed_data.data; }
536 void* Peer() const { return cobject_->value.as_external_typed_data.peer; } 536 void* Peer() const { return cobject_->value.as_external_typed_data.peer; }
537 Dart_WeakPersistentHandleFinalizer Callback() const { 537 Dart_WeakPersistentHandleFinalizer Callback() const {
538 return cobject_->value.as_external_typed_data.callback; 538 return cobject_->value.as_external_typed_data.callback;
539 } 539 }
540 540
541 private: 541 private:
542 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); 542 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array);
543 }; 543 };
544 544
545
546 class ScopedBlockingCall {
547 public:
548 ScopedBlockingCall() {
549 Dart_IsolateBlocked();
550 }
551
552 ~ScopedBlockingCall() {
553 Dart_IsolateUnblocked();
554 }
555 };
556
545 } // namespace bin 557 } // namespace bin
546 } // namespace dart 558 } // namespace dart
547 559
548 #endif // BIN_DARTUTILS_H_ 560 #endif // BIN_DARTUTILS_H_
OLDNEW
« 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