For various reason having to do with the instruction set, x86 and x86-64 code is impossible to verify as safe to run.
Google Native Client gets around that with a combination of static analysis and an execution sandbox (separate from the sandbox chrome already uses.) That's pretty close to what you're asking for, but afaik only works in chrome. It supports x86-32, x86-64, and ARM.
It's complicated imo: many processes involved with a single browser tab, with lots named pipes, all branch instructions have to be
thunked, requiring a lot of overhead for branches. You also have to have compiler support. Google only supports C/C++. There are third party tools for Lua, Python and Ruby, and some work is being done that would allow you to use any language that can target LLVM's intermediate format.
The lack of browser support is the biggest problem though.