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

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

Issue 14273021: Report OOM errors instead of asserting on allocation failures when sending (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 323
324 static const Bool& bool_true() { 324 static const Bool& bool_true() {
325 ASSERT(bool_true_ != NULL); 325 ASSERT(bool_true_ != NULL);
326 return *bool_true_; 326 return *bool_true_;
327 } 327 }
328 static const Bool& bool_false() { 328 static const Bool& bool_false() {
329 ASSERT(bool_false_ != NULL); 329 ASSERT(bool_false_ != NULL);
330 return *bool_false_; 330 return *bool_false_;
331 } 331 }
332 static const LanguageError& snapshot_writer_error() {
333 ASSERT(snapshot_writer_error_ != NULL);
334 return *snapshot_writer_error_;
335 }
332 336
333 static RawClass* class_class() { return class_class_; } 337 static RawClass* class_class() { return class_class_; }
334 static RawClass* null_class() { return null_class_; } 338 static RawClass* null_class() { return null_class_; }
335 static RawClass* dynamic_class() { return dynamic_class_; } 339 static RawClass* dynamic_class() { return dynamic_class_; }
336 static RawClass* void_class() { return void_class_; } 340 static RawClass* void_class() { return void_class_; }
337 static RawClass* unresolved_class_class() { return unresolved_class_class_; } 341 static RawClass* unresolved_class_class() { return unresolved_class_class_; }
338 static RawClass* type_arguments_class() { return type_arguments_class_; } 342 static RawClass* type_arguments_class() { return type_arguments_class_; }
339 static RawClass* instantiated_type_arguments_class() { 343 static RawClass* instantiated_type_arguments_class() {
340 return instantiated_type_arguments_class_; 344 return instantiated_type_arguments_class_;
341 } 345 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 static RawClass* unhandled_exception_class_; // Class of UnhandledException. 517 static RawClass* unhandled_exception_class_; // Class of UnhandledException.
514 static RawClass* unwind_error_class_; // Class of UnwindError. 518 static RawClass* unwind_error_class_; // Class of UnwindError.
515 519
516 // The static values below are read-only handle pointers for singleton 520 // The static values below are read-only handle pointers for singleton
517 // objects that are shared between the different isolates. 521 // objects that are shared between the different isolates.
518 static Array* empty_array_; 522 static Array* empty_array_;
519 static Instance* sentinel_; 523 static Instance* sentinel_;
520 static Instance* transition_sentinel_; 524 static Instance* transition_sentinel_;
521 static Bool* bool_true_; 525 static Bool* bool_true_;
522 static Bool* bool_false_; 526 static Bool* bool_false_;
527 static LanguageError* snapshot_writer_error_;
523 528
524 friend void ClassTable::Register(const Class& cls); 529 friend void ClassTable::Register(const Class& cls);
525 friend void RawObject::Validate(Isolate* isolate) const; 530 friend void RawObject::Validate(Isolate* isolate) const;
526 friend class Closure; 531 friend class Closure;
527 friend class SnapshotReader; 532 friend class SnapshotReader;
528 friend class OneByteString; 533 friend class OneByteString;
529 friend class TwoByteString; 534 friend class TwoByteString;
530 friend class ExternalOneByteString; 535 friend class ExternalOneByteString;
531 friend class ExternalTwoByteString; 536 friend class ExternalTwoByteString;
532 537
(...skipping 5164 matching lines...) Expand 10 before | Expand all | Expand 10 after
5697 5702
5698 5703
5699 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5704 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5700 intptr_t index) { 5705 intptr_t index) {
5701 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5706 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5702 } 5707 }
5703 5708
5704 } // namespace dart 5709 } // namespace dart
5705 5710
5706 #endif // VM_OBJECT_H_ 5711 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698