| Index: runtime/vm/dart.cc
|
| diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
|
| index 579691ec6714e39e4bd61ad73e82ef08cacc7460..43aebebeb33fe50c242baf2fe59559151ee9544e 100644
|
| --- a/runtime/vm/dart.cc
|
| +++ b/runtime/vm/dart.cc
|
| @@ -530,8 +530,14 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
|
| String::New("Invalid snapshot"));
|
| return ApiError::New(message);
|
| }
|
| + if (snapshot->kind() != snapshot_kind_) {
|
| + const String& message = String::Handle(
|
| + String::NewFormatted("Invalid snapshot kind: got '%s', expected '%s'",
|
| + Snapshot::KindToCString(snapshot->kind()),
|
| + Snapshot::KindToCString(snapshot_kind_)));
|
| + return ApiError::New(message);
|
| + }
|
| ASSERT(Snapshot::IsFull(snapshot->kind()));
|
| - ASSERT(snapshot->kind() == snapshot_kind_);
|
| if (FLAG_trace_isolates) {
|
| OS::Print("Size of isolate snapshot = %" Pd "\n", snapshot->length());
|
| }
|
|
|