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

Side by Side Diff: runtime/vm/dart_api_state.h

Issue 10014002: Rename Api::NewLocalHandle -> Api::NewHandle. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger_api_impl.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 VM_DART_API_STATE_H_ 5 #ifndef VM_DART_API_STATE_H_
6 #define VM_DART_API_STATE_H_ 6 #define VM_DART_API_STATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/thread.h" 10 #include "platform/thread.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 57 };
58 58
59 59
60 // Implementation of local handles which are handed out from every 60 // Implementation of local handles which are handed out from every
61 // dart API call, these handles are valid only in the present scope 61 // dart API call, these handles are valid only in the present scope
62 // and are destroyed when a Dart_ExitScope() is called. 62 // and are destroyed when a Dart_ExitScope() is called.
63 class LocalHandle { 63 class LocalHandle {
64 public: 64 public:
65 // Accessors. 65 // Accessors.
66 RawObject* raw() const { return raw_; } 66 RawObject* raw() const { return raw_; }
67 void set_raw(const Object& object) { raw_ = object.raw(); } 67 void set_raw(RawObject* raw) { raw_ = raw; }
68 static intptr_t raw_offset() { return OFFSET_OF(LocalHandle, raw_); } 68 static intptr_t raw_offset() { return OFFSET_OF(LocalHandle, raw_); }
69 69
70 private: 70 private:
71 LocalHandle() { } 71 LocalHandle() { }
72 ~LocalHandle() { } 72 ~LocalHandle() { }
73 73
74 RawObject* raw_; 74 RawObject* raw_;
75 DISALLOW_ALLOCATION(); // Allocated through AllocateHandle methods. 75 DISALLOW_ALLOCATION(); // Allocated through AllocateHandle methods.
76 DISALLOW_COPY_AND_ASSIGN(LocalHandle); 76 DISALLOW_COPY_AND_ASSIGN(LocalHandle);
77 }; 77 };
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 ApiNativeScope::Current()->zone()->GetBaseZone()) {} 655 ApiNativeScope::Current()->zone()->GetBaseZone()) {}
656 ApiGrowableArray() 656 ApiGrowableArray()
657 : BaseGrowableArray<T, ValueObject>( 657 : BaseGrowableArray<T, ValueObject>(
658 ApiNativeScope::Current()->zone()->GetBaseZone()) {} 658 ApiNativeScope::Current()->zone()->GetBaseZone()) {}
659 }; 659 };
660 660
661 661
662 } // namespace dart 662 } // namespace dart
663 663
664 #endif // VM_DART_API_STATE_H_ 664 #endif // VM_DART_API_STATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698