Apparently, when the language is C++, the value is somewhere above many millions of dollars, and we don't know what it is.
Can we reasonably expect that price to be lower with language X? For many reasons, I would argue 'yes'.
If all you want is to keep users safe then it'd be easy - ban JavaScript wholesale. Bam, done, instantly made the web safer & faster. Don't even need to deal with the huge security can of worms that is WebGL, either.
But safety is rarely the exclusive factor in play, now is it? Things like memory usage efficiency & performance also play large roles here.
The only semi-proven way to not get owned at this point is to never go online.
Can you elaborate? https://github.com/GrrrDog/Java-Deserialization-Cheat-Sheet is just one example compendium. The number of vulnerabilities in this area is huge, across a wide range of libraries. It really is an entire category of exploits at this point, and it's still ongoing (eg, from last year: https://nvd.nist.gov/vuln/detail/CVE-2018-4939 )
I don't consider those on the same level as memory unsafety, personally, but it's not really a meaningful comparison because I'm not going to dig around for numbers and mitigation techniques.
DOMArrayBuffer* result = DOMArrayBuffer::Create(raw_data_->ToArrayBuffer());
...
raw_data_.reset();
...
return result;
I'd imagine the effort/time/money it would take to replace those raw pointers with memory safe substitutes [2][3][4] (and enforce the ban going forward) would be relatively modest. Performance shouldn't be an issue [5].[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus
[2] https://github.com/duneroadrunner/SaferCPlusPlus#registered-...
[3] https://github.com/duneroadrunner/SaferCPlusPlus#norad-point...
[4] https://github.com/duneroadrunner/SaferCPlusPlus#scope-point...
[5] https://github.com/duneroadrunner/SaferCPlusPlus-BenchmarksG...
[1] https://chromium.googlesource.com/chromium/src/+/master/thir...
The ArrayBuffer itself also uses reference counters rather than the GC base classes from Oilpan. https://chromium.googlesource.com/chromium/src/+/refs/heads/...
See also https://chromium.googlesource.com/chromium/src/+/refs/heads/... and https://chromium.googlesource.com/chromium/src/+/refs/heads/...
https://github.com/chromium/chromium/blob/ba9748e78ec7e9c0d5...