Conventional thinking is that if a malicious user can run code on your system, you've lost. In that sense, this is just another local exploit, of which there are many.
I'm not discounting that CPUs should operate correctly into the future but the current sandboxes would seem to rely on whims of a CPU's microcode. And the question for browser makers is whether to trust them.
in other words, the halting problem?
So question is, can the Javascript engine generate suboptimal but safe machine code?