-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc-search: fix a race condition in search index loading #118961
Conversation
`var` declare it in the global scope, and `const` does not. It needs to be declared in global scope.
9e952b7
to
09c8fd3
Compare
Can you send a regression test in a follow-up PR please? @bors r+ p=1 |
☀️ Test successful - checks-actions |
Is there any way to force search.js to finish loading after search-index.js does in browser-ui-test? I couldn’t find one (the existing test cases already break on my machine). |
You can't, however there is an easy way to prevent the bug: having a counter and when it reaches two, then calling the search. I can send a fix if you want? |
That sounds good, sure. |
Still need a regression test though. ;) |
Finished benchmarking commit (96df494): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.135s -> 671.047s (-0.16%) |
…illaumeGomez rustdoc: add regression test for JS data file loading Follow up for rust-lang#118961
…illaumeGomez rustdoc: add regression test for JS data file loading Follow up for rust-lang#118961
Rollup merge of rust-lang#118988 - notriddle:notriddle/varconst, r=GuillaumeGomez rustdoc: add regression test for JS data file loading Follow up for rust-lang#118961
var
declare it in the global scope, andconst
does not. It needs to be declared in global scope.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
Fixes a regression introduced by #118910