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

Unified Diff: runtime/lib/isolate.cc

Issue 68813002: Fix VM not accepting static methods for Isolate.spawn. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated and extended tests. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | runtime/vm/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698