barbaz wrote:Are you saying that code which won't need the browser as a medium (which the right kind of binary code won't) can't do more damage than JavaScript that "accidentally" gains chrome privileges?
They're not talking about native code; they're talking about intermediate code, like Java bytecode. Compiled up to a point, then interpreted.
Yes, native code is more dangerous, but binary != native. You can't have a browser running arbitrary untrusted native code; that's complete system takeover as soon as you visit a web page. It *has* to be interpreted in order to apply any kind of sandboxing to it.
Thrawn wrote:I would have thought that anything that cannot be decompiled probably cannot be executed. You can always turn machine instructions back into mnemonics at the very least. The result may be ugly, but so is minified JavaScript...
Well, I can think of a few cases:
1) DRM encryption of sorts applied to the compiled code, or a DRM lock (if the spec ends up allowing for this and all browser vendors comply.. I really hope that doesn't happen though)
Maybe. Theoretically you could also encrypt JavaScript text, though.
Yes, that is more of a concern...although it's basically just obfuscation on steroids.
But in any case, can a "prettifyer" do enough to make it even as human readable as prettifyed minified JS?
If it can be translated directly into asm.js (which is supposed to be the case for the polyfills), then I'd say so.
(And I'm pretty sure I remember trying to decompile Java code that executed fine, and it wouldn't fully decompile into something human-readable enough... I can't remember what it was or what I was trying to get out of it though.)
Well, if you can provide an example, we could look more into that.