| Index: runtime/vm/snapshot.cc
|
| ===================================================================
|
| --- runtime/vm/snapshot.cc (revision 38227)
|
| +++ runtime/vm/snapshot.cc (working copy)
|
| @@ -167,8 +167,6 @@
|
|
|
|
|
| RawObject* SnapshotReader::ReadObject() {
|
| - const Instance& null_object = Instance::Handle();
|
| - *ErrorHandle() = UnhandledException::New(null_object, null_object);
|
| // Setup for long jump in case there is an exception while reading.
|
| LongJumpScope jump;
|
| if (setjmp(*jump.Set()) == 0) {
|
| @@ -676,6 +674,11 @@
|
| }
|
|
|
|
|
| +RawUnhandledException* SnapshotReader::NewUnhandledException() {
|
| + ALLOC_NEW_OBJECT(UnhandledException, Object::unhandled_exception_class());
|
| +}
|
| +
|
| +
|
| RawObject* SnapshotReader::NewInteger(int64_t value) {
|
| ASSERT((value & kSmiTagMask) == kSmiTag);
|
| value = value >> kSmiTagShift;
|
| @@ -724,10 +727,9 @@
|
| // into dart code or allocating any code.
|
| // We do a longjmp at this point to unwind out of the entire
|
| // read part and return the error object back.
|
| - const Instance& exception =
|
| - Instance::Handle(object_store()->out_of_memory());
|
| - ErrorHandle()->set_exception(exception);
|
| - Isolate::Current()->long_jump_base()->Jump(1, *ErrorHandle());
|
| + const UnhandledException& error = UnhandledException::Handle(
|
| + object_store()->preallocated_unhandled_exception());
|
| + Isolate::Current()->long_jump_base()->Jump(1, error);
|
| }
|
| #if defined(DEBUG)
|
| // Zap the uninitialized memory area.
|
|
|