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

Side by Side Diff: runtime/vm/object_store.cc

Issue 908433002: - Make sure to fail early if an non-stacktrace is passed into the VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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/object.cc ('k') | runtime/vm/raw_object.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "vm/object_store.h" 5 #include "vm/object_store.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 Symbols::Dot(), 143 Symbols::Dot(),
144 Object::empty_array()); 144 Object::empty_array());
145 if (result.IsError()) { 145 if (result.IsError()) {
146 return false; 146 return false;
147 } 147 }
148 set_out_of_memory(Instance::Cast(result)); 148 set_out_of_memory(Instance::Cast(result));
149 149
150 // Allocate pre-allocated unhandled exception object initialized with the 150 // Allocate pre-allocated unhandled exception object initialized with the
151 // pre-allocated OutOfMemoryError. 151 // pre-allocated OutOfMemoryError.
152 const UnhandledException& unhandled_exception = UnhandledException::Handle( 152 const UnhandledException& unhandled_exception = UnhandledException::Handle(
153 UnhandledException::New(Instance::Cast(result), Object::null_instance())); 153 UnhandledException::New(Instance::Cast(result),
154 Stacktrace::Handle(isolate)));
154 set_preallocated_unhandled_exception(unhandled_exception); 155 set_preallocated_unhandled_exception(unhandled_exception);
155 156
156 const Array& code_array = Array::Handle( 157 const Array& code_array = Array::Handle(
157 isolate, 158 isolate,
158 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); 159 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
159 const Array& pc_offset_array = Array::Handle( 160 const Array& pc_offset_array = Array::Handle(
160 isolate, 161 isolate,
161 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); 162 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
162 const Stacktrace& stack_trace = 163 const Stacktrace& stack_trace =
163 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); 164 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array));
(...skipping 22 matching lines...) Expand all
186 cls = async_lib.LookupClass(Symbols::StreamIterator()); 187 cls = async_lib.LookupClass(Symbols::StreamIterator());
187 ASSERT(!cls.IsNull()); 188 ASSERT(!cls.IsNull());
188 set_stream_iterator_class(cls); 189 set_stream_iterator_class(cls);
189 190
190 const Library& internal_lib = Library::Handle(internal_library()); 191 const Library& internal_lib = Library::Handle(internal_library());
191 cls = internal_lib.LookupClass(Symbols::Symbol()); 192 cls = internal_lib.LookupClass(Symbols::Symbol());
192 set_symbol_class(cls); 193 set_symbol_class(cls);
193 } 194 }
194 195
195 } // namespace dart 196 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698