Index: runtime/lib/isolate_patch.dart |
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart |
index 7e4579a419072dd90df43b52fa71e1f8f12141e0..65565058acf186d1c343b230bd69f03494fe7380 100644 |
--- a/runtime/lib/isolate_patch.dart |
+++ b/runtime/lib/isolate_patch.dart |
@@ -310,6 +310,11 @@ void _startIsolate(SendPort parentPort, |
// `paused` isn't handled yet. |
RawReceivePort readyPort; |
try { |
+ // Check for the type of `entryPoint` on the spawning isolate to make |
+ // error-handling easier. |
+ if (entryPoint is! _MainFunctionArgs) { |
Lasse Reichstein Nielsen
2016/10/14 10:13:56
_MainFunctionArgs is not really the correct type n
floitsch
2016/10/14 11:25:58
Done.
|
+ throw new ArgumentError(entryPoint); |
+ } |
// The VM will invoke [_startIsolate] with entryPoint as argument. |
readyPort = new RawReceivePort(); |