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

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

Issue 51393002: Raise an exception instead of crashing when attempting to pass a MirrorReference between isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « no previous file | tests/isolate/illegal_msg_function_test.dart » ('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 #include "vm/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/snapshot.h" 8 #include "vm/snapshot.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/visitor.h" 10 #include "vm/visitor.h"
(...skipping 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 intptr_t tags, 2647 intptr_t tags,
2648 Snapshot::Kind kind) { 2648 Snapshot::Kind kind) {
2649 UNREACHABLE(); 2649 UNREACHABLE();
2650 return MirrorReference::null(); 2650 return MirrorReference::null();
2651 } 2651 }
2652 2652
2653 2653
2654 void RawMirrorReference::WriteTo(SnapshotWriter* writer, 2654 void RawMirrorReference::WriteTo(SnapshotWriter* writer,
2655 intptr_t object_id, 2655 intptr_t object_id,
2656 Snapshot::Kind kind) { 2656 Snapshot::Kind kind) {
2657 UNREACHABLE(); 2657 if (kind == Snapshot::kMessage) {
2658 // We do not allow objects with native fields in an isolate message.
2659 writer->SetWriteException(Exceptions::kArgument,
2660 "Illegal argument in isolate message"
2661 " : (object is a MirrorReference)");
2662 } else {
2663 UNREACHABLE();
2664 }
2658 } 2665 }
2659 2666
2660 } // namespace dart 2667 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/isolate/illegal_msg_function_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698