File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 8080 "escape-string-regexp" : " ^4.0.0" ,
8181 "gecko-profiler-demangle" : " ^0.3.3" ,
8282 "idb" : " ^8.0.3" ,
83- "iongraph-web" : " 0.1.4 " ,
83+ "iongraph-web" : " 0.1.15 " ,
8484 "jszip" : " ^3.10.1" ,
8585 "long" : " ^5.3.2" ,
8686 "memoize-immutable" : " ^3.0.0" ,
Original file line number Diff line number Diff line change 33 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44import type { LineTimings } from 'firefox-profiler/types' ;
55
6- import { GraphViewer } from 'iongraph-web' ;
7- import type { Func } from 'iongraph-web' ;
6+ import { GraphViewer , migrate } from 'iongraph-web' ;
87import 'iongraph-web/dist/style.css' ;
98
109import { useMemo } from 'react' ;
1110
1211type IonGraphViewProps = {
1312 readonly sourceCode : string ;
14- // TODO: use these when https://github.com/mozilla-spidermonkey/iongraph-web/issues/3 is resolved.
1513 readonly timings : LineTimings ;
1614 readonly hotSpotTimings : LineTimings ;
1715} ;
1816
1917export function IonGraphView ( props : IonGraphViewProps ) {
20- const func = useMemo ( ( ) => {
18+ const ionJSON = useMemo ( ( ) => {
2119 if ( props . sourceCode . trim ( ) === '' ) {
2220 return null ;
2321 }
24- return JSON . parse ( props . sourceCode ) as Func ;
22+ return migrate ( JSON . parse ( props . sourceCode ) ) ;
2523 } , [ props . sourceCode ] ) ;
2624
27- if ( ! func ) {
25+ if ( ! ionJSON ?. functions [ 0 ] ) {
2826 return < div /> ;
2927 }
30- return < GraphViewer func = { func } /> ;
28+ return (
29+ < GraphViewer func = { ionJSON . functions [ 0 ] } sampleCounts = { props . timings } />
30+ ) ;
3131}
Original file line number Diff line number Diff line change @@ -6421,10 +6421,10 @@ interpret@^3.1.1:
64216421 resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4"
64226422 integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==
64236423
6424- 6425- version "0.1.4 "
6426- resolved "https://registry.yarnpkg.com/iongraph-web/-/iongraph-web-0.1.4 .tgz#ee797db67660f3628d65970374ffb06327c7e122 "
6427- integrity sha512-dH/bBiplFDYWP1WKr8PDPMHY+rQTSyrokGtbqPk2IO0tnCp0zLbXCByJdZiZthqVKjZYzq5V0ouSqW0uijR/6A ==
6424+ 6425+ version "0.1.15 "
6426+ resolved "https://registry.yarnpkg.com/iongraph-web/-/iongraph-web-0.1.15 .tgz#8d39240cbfaf476ff7e0f3f14b0301eff33477d7 "
6427+ integrity sha512-9QRt32bVk9Uskwb0NYgrrGBo3p7gI2pIuwMgq/ifR3jzyfgKQeICZfngW6GM2Wvivxdxb0y8MxIzJ4Kh3cWZuQ ==
64286428
6429642964306430 version "1.9.1"
You can’t perform that action at this time.
0 commit comments