| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 2c6422e7d0e5d68d8799ed3ba5034b6b3bc99174..546148d2668fed3a0ed6b203503f0ffa94db40fd 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -1907,6 +1907,7 @@ RawObject* Object::Allocate(intptr_t cls_id, intptr_t size, Heap::Space space) {
|
| Isolate* isolate = thread->isolate();
|
| // New space allocation allowed only in mutator thread (Dart thread);
|
| ASSERT(thread->IsMutatorThread() || (space != Heap::kNew));
|
| + RELEASE_ASSERT(!thread->IsInsideParser() || (space != Heap::kNew));
|
| ASSERT(thread->no_callback_scope_depth() == 0);
|
| Heap* heap = isolate->heap();
|
|
|
| @@ -3092,6 +3093,7 @@ RawFunction* Function::EvaluateHelper(const Class& cls,
|
| const String& expr,
|
| const Array& param_names,
|
| bool is_static) {
|
| + LeaveParserScope _(Thread::Current());
|
| const String& func_src =
|
| String::Handle(BuildClosureSource(param_names, expr));
|
| Script& script = Script::Handle();
|
|
|