| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index f7c00d41f650a3f6c4ef1a59466c0bf439e46831..5ac7b16bc623997de4009c8d6e4985eea82abacd 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -12214,21 +12214,20 @@ class Geolocation extends NativeFieldWrapperClass1 {
|
| int watchId;
|
| var controller;
|
| controller = new StreamController<Geoposition>(
|
| - onSubscriptionStateChange: () {
|
| - if (controller.hasListener) {
|
| - assert(watchId == null);
|
| - watchId = $dom_watchPosition(
|
| - (position) {
|
| - controller.add(_ensurePosition(position));
|
| - },
|
| - (error) {
|
| - controller.addError(error);
|
| - },
|
| - options);
|
| - } else {
|
| - assert(watchId != null);
|
| - $dom_clearWatch(watchId);
|
| - }
|
| + onListen: () {
|
| + assert(watchId == null);
|
| + watchId = $dom_watchPosition(
|
| + (position) {
|
| + controller.add(_ensurePosition(position));
|
| + },
|
| + (error) {
|
| + controller.addError(error);
|
| + },
|
| + options);
|
| + },
|
| + onCancel: () {
|
| + assert(watchId != null);
|
| + $dom_clearWatch(watchId);
|
| });
|
|
|
| return controller.stream;
|
|
|