| Index: runtime/vm/exceptions.cc
|
| ===================================================================
|
| --- runtime/vm/exceptions.cc (revision 26931)
|
| +++ runtime/vm/exceptions.cc (working copy)
|
| @@ -161,7 +161,7 @@
|
| stacktrace_.SetFunctionAtFrame(null_slot, frame_func);
|
| stacktrace_.SetCodeAtFrame(null_slot, frame_code);
|
| }
|
| - // Move frames one slot down so that we can accomadate the new frame.
|
| + // Move frames one slot down so that we can accomodate the new frame.
|
| for (intptr_t i = start; i < Stacktrace::kPreallocatedStackdepth; i++) {
|
| intptr_t prev = (i - 1);
|
| frame_func = stacktrace_.FunctionAtFrame(i);
|
| @@ -365,6 +365,10 @@
|
|
|
|
|
| static RawField* LookupStacktraceField(const Instance& instance) {
|
| + if (instance.GetClassId() < kNumPredefinedCids) {
|
| + // 'class Error' is not a predefined class.
|
| + return Field::null();
|
| + }
|
| Isolate* isolate = Isolate::Current();
|
| Class& error_class = Class::Handle(isolate,
|
| isolate->object_store()->error_class());
|
|
|