| Index: runtime/lib/isolate.cc
|
| diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
|
| index f9000831c29f1d16b636aeb06edaa2f8ae3a23c7..0ac98579bf8ad907152eab83a57874740f0f7eaf 100644
|
| --- a/runtime/lib/isolate.cc
|
| +++ b/runtime/lib/isolate.cc
|
| @@ -220,8 +220,7 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 1) {
|
| Function& func = Function::Handle();
|
| if (closure.IsClosure()) {
|
| func = Closure::function(closure);
|
| - const Class& cls = Class::Handle(func.Owner());
|
| - if (!func.IsClosureFunction() || !func.is_static() || !cls.IsTopLevel()) {
|
| + if (!func.IsClosureFunction() || !func.is_static()) {
|
| throw_exception = true;
|
| }
|
| } else {
|
| @@ -229,7 +228,7 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 1) {
|
| }
|
| if (throw_exception) {
|
| const String& msg = String::Handle(String::New(
|
| - "Isolate.spawn expects to be passed a top-level function"));
|
| + "Isolate.spawn expects to be passed a static or top-level function"));
|
| Exceptions::ThrowArgumentError(msg);
|
| }
|
|
|
|
|