Unverified Commit a2f48a36 authored by Mouad Debbar's avatar Mouad Debbar Committed by GitHub
parent f10a6ef7
......@@ -10,6 +10,7 @@ import 'dart:js_interop';
import 'dart:js_interop_unsafe';
import 'dart:math' as math;
import 'dart:ui';
import 'dart:ui_web' as ui_web;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
......@@ -1335,8 +1336,7 @@ void registerEngineBenchmarkValueListener(String name, EngineBenchmarkValueListe
if (_engineBenchmarkListeners.isEmpty) {
// The first listener is being registered. Register the global listener.
web.window['_flutter_internal_on_benchmark'.toJS] =
_dispatchEngineBenchmarkValue.toJS;
ui_web.benchmarkValueCallback = _dispatchEngineBenchmarkValue;
}
_engineBenchmarkListeners[name] = listener;
}
......@@ -1347,7 +1347,7 @@ void stopListeningToEngineBenchmarkValues(String name) {
if (_engineBenchmarkListeners.isEmpty) {
// The last listener unregistered. Remove the global listener.
web.window['_flutter_internal_on_benchmark'.toJS] = null;
ui_web.benchmarkValueCallback = null;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment