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

Unified Diff: lib/compiler/implementation/lib/isolate_patch.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months 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
Index: lib/compiler/implementation/lib/isolate_patch.dart
diff --git a/lib/compiler/implementation/lib/isolate_patch.dart b/lib/compiler/implementation/lib/isolate_patch.dart
index 66e81d92cfd9f0f0d1db7e4b291ddd2f8e3a61fe..62656db24bb1ccafcf95c943078c9db1401aaeb5 100644
--- a/lib/compiler/implementation/lib/isolate_patch.dart
+++ b/lib/compiler/implementation/lib/isolate_patch.dart
@@ -106,7 +106,7 @@ patch ReceivePort get port {
patch SendPort spawnFunction(void topLevelFunction()) {
final name = _IsolateNatives._getJSFunctionName(topLevelFunction);
if (name == null) {
- throw new UnsupportedOperationException(
+ throw new StateError(
"only top-level functions can be spawned.");
}
return _IsolateNatives._spawn(name, null, false);
@@ -561,7 +561,7 @@ class _IsolateNatives {
static SendPort _startNonWorker(
String functionName, String uri, SendPort replyPort) {
// TODO(eub): support IE9 using an iframe -- Dart issue 1702.
- if (uri != null) throw new UnsupportedOperationException(
+ if (uri != null) throw new StateError(
"Currently spawnUri is not supported without web workers.");
_globalState.topEventLoop.enqueue(new _IsolateContext(), function() {
final func = _getJSFunctionFromName(functionName);

Powered by Google App Engine
This is Rietveld 408576698