From feb026330092abb20b77ff3151c8ac1bbaf43e6e Mon Sep 17 00:00:00 2001 From: Lalit Maganti Date: Fri, 23 Aug 2024 03:40:12 -0700 Subject: [PATCH] ui: delay sql module registration until after potential reset Fixes loading SQL modules when resetting the state of trace processor (e.g. loading trace from local storage on an already created instance of TP) Change-Id: I3f106f7d164e13c75edff8153c3cdb2965b17a48 --- ui/src/controller/trace_controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/controller/trace_controller.ts b/ui/src/controller/trace_controller.ts index 378d731f6f..95b7bc5163 100644 --- a/ui/src/controller/trace_controller.ts +++ b/ui/src/controller/trace_controller.ts @@ -430,9 +430,6 @@ export class TraceController extends Controller { ftraceDropUntilAllCpusValid: FTRACE_DROP_UNTIL_FLAG.get(), }); } - for (const p of globals.extraSqlPackages) { - await engine.registerSqlModules(p); - } this.engine = engine; if (isMetatracingEnabled()) { @@ -491,6 +488,9 @@ export class TraceController extends Controller { assertTrue(this.engine instanceof HttpRpcEngine); await this.engine.restoreInitialTables(); } + for (const p of globals.extraSqlPackages) { + await this.engine.registerSqlModules(p); + } // traceUuid will be '' if the trace is not cacheable (URL or RPC). const traceUuid = await this.cacheCurrentTrace();