diff --git a/package.json b/package.json index 1513fa862a..c757a19e76 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "escape-string-regexp": "^4.0.0", "gecko-profiler-demangle": "^0.3.3", "idb": "^8.0.3", - "iongraph-web": "0.1.4", + "iongraph-web": "0.1.15", "jszip": "^3.10.1", "long": "^5.3.2", "memoize-immutable": "^3.0.0", diff --git a/src/components/shared/IonGraphView.tsx b/src/components/shared/IonGraphView.tsx index fecaf73c5f..89fb7eb305 100644 --- a/src/components/shared/IonGraphView.tsx +++ b/src/components/shared/IonGraphView.tsx @@ -3,29 +3,29 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import type { LineTimings } from 'firefox-profiler/types'; -import { GraphViewer } from 'iongraph-web'; -import type { Func } from 'iongraph-web'; +import { GraphViewer, migrate } from 'iongraph-web'; import 'iongraph-web/dist/style.css'; import { useMemo } from 'react'; type IonGraphViewProps = { readonly sourceCode: string; - // TODO: use these when https://github.com/mozilla-spidermonkey/iongraph-web/issues/3 is resolved. readonly timings: LineTimings; readonly hotSpotTimings: LineTimings; }; export function IonGraphView(props: IonGraphViewProps) { - const func = useMemo(() => { + const ionJSON = useMemo(() => { if (props.sourceCode.trim() === '') { return null; } - return JSON.parse(props.sourceCode) as Func; + return migrate(JSON.parse(props.sourceCode)); }, [props.sourceCode]); - if (!func) { + if (!ionJSON?.functions[0]) { return
; } - return ; + return ( + + ); } diff --git a/yarn.lock b/yarn.lock index 19d2320d5e..5d1a8f9cfd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6421,10 +6421,10 @@ interpret@^3.1.1: resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== -iongraph-web@0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/iongraph-web/-/iongraph-web-0.1.4.tgz#ee797db67660f3628d65970374ffb06327c7e122" - integrity sha512-dH/bBiplFDYWP1WKr8PDPMHY+rQTSyrokGtbqPk2IO0tnCp0zLbXCByJdZiZthqVKjZYzq5V0ouSqW0uijR/6A== +iongraph-web@0.1.15: + version "0.1.15" + resolved "https://registry.yarnpkg.com/iongraph-web/-/iongraph-web-0.1.15.tgz#8d39240cbfaf476ff7e0f3f14b0301eff33477d7" + integrity sha512-9QRt32bVk9Uskwb0NYgrrGBo3p7gI2pIuwMgq/ifR3jzyfgKQeICZfngW6GM2Wvivxdxb0y8MxIzJ4Kh3cWZuQ== ipaddr.js@1.9.1: version "1.9.1"