Files
sdk/runtime/observatory/tests/service/timeline_leak_test.dart
T
Ryan Macnak 0bb41de8ff Fix leak when timeline event names or arguments are OneByteStrings not expressible in ASCII.
Change-Id: Ieca5e748c12364f11231f78f4e87e374079765d4
Reviewed-on: https://dart-review.googlesource.com/8702
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-27 02:45:15 +00:00

24 lines
798 B
Dart

// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--timeline-recorder=ring --timeline-streams=Dart
import 'dart:developer';
main() {
for (var i = 0; i < 100000; i++) {
// OneByteString, ASCII
Timeline.startSync('ASCII', arguments: {'arg': 'ASCII'});
Timeline.finishSync();
// OneByteString, Latin1
Timeline.startSync('blåbærgrød', arguments: {'arg': 'blåbærgrød'});
Timeline.finishSync();
// TwoByteString
Timeline.startSync('Îñţérñåţîöñåļîžåţîờñ',
arguments: {'arg': 'Îñţérñåţîöñåļîžåţîờñ'});
Timeline.finishSync();
}
}