Merge "Fix implicit conversion."
diff --git a/gn/perfetto.gni b/gn/perfetto.gni
index 2045502..4bf6252 100644
--- a/gn/perfetto.gni
+++ b/gn/perfetto.gni
@@ -161,7 +161,8 @@
 
   # Misc host executable under tools/.
   enable_perfetto_tools =
-      perfetto_build_with_android || perfetto_build_standalone
+      (perfetto_build_standalone && current_toolchain == host_toolchain) ||
+      perfetto_build_with_android
 
   # Allows to build the UI (TypeScript/ HTML / WASM)
   enable_perfetto_ui = perfetto_build_standalone
diff --git a/tools/tmux b/tools/tmux
index 2959ed0..7bc2734 100755
--- a/tools/tmux
+++ b/tools/tmux
@@ -186,11 +186,7 @@
   DIR=$(mktemp -p $TMPDIR -d perfetto.XXXXXX)
 fi
 
-if is_android "$OUT"; then
-  tools/ninja -C "$OUT" traced traced_probes perfetto test/configs
-else
-  tools/ninja -C "$OUT" traced traced_probes perfetto test/configs trace_to_text
-fi
+tools/ninja -C "$OUT" traced traced_probes perfetto trace_to_text test/configs
 
 push "$OUT/traced"
 push "$OUT/traced_probes"
diff --git a/ui/src/controller/trace_controller.ts b/ui/src/controller/trace_controller.ts
index 86b4c50..1f71e7b 100644
--- a/ui/src/controller/trace_controller.ts
+++ b/ui/src/controller/trace_controller.ts
@@ -163,11 +163,11 @@
       }
     } else if (engineCfg.source instanceof ArrayBuffer) {
       this.updateStatus(`${statusHeader} 0 %`);
-      const buffer = engineCfg.source;
+      const buffer = new Uint8Array(engineCfg.source);
       const SLICE_SIZE = 1024 * 1024;
       for (let off = 0; off < buffer.byteLength; off += SLICE_SIZE) {
-        const slice = buffer.slice(off, off + SLICE_SIZE);
-        await this.engine.parse(new Uint8Array(slice));
+        const slice = buffer.subarray(off, off + SLICE_SIZE);
+        await this.engine.parse(slice);
         const progress =
             Math.round((off + slice.byteLength) / buffer.byteLength * 100);
         this.updateStatus(`${statusHeader} ${progress} %`);
diff --git a/ui/src/tracks/heap_profile/frontend.ts b/ui/src/tracks/heap_profile/frontend.ts
index c53cfb1..4c0441e 100644
--- a/ui/src/tracks/heap_profile/frontend.ts
+++ b/ui/src/tracks/heap_profile/frontend.ts
@@ -15,7 +15,6 @@
 import {TrackState} from '../../common/state';
 import {fromNs} from '../../common/time';
 import {globals} from '../../frontend/globals';
-import {TimeScale} from '../../frontend/time_scale';
 import {Track} from '../../frontend/track';
 import {trackRegistry} from '../../frontend/track_registry';
 import {Config, Data, HEAP_PROFILE_TRACK_KIND} from './common';