3 ms·
Chromium initial design was a very simple main process and few untrusted relatively fat processes for web pages each holding set of tabs. That could have worked
by fpoling 6y ago
Chromium initial design was a very simple main process and few untrusted relatively fat processes for web pages each holding set of tabs. That could have worked with C++. However the need for site isolation, performance considerations and hardware vulnerabilities later put an end to it.
For example, initially Chromium had no support from isolating iframes from the main document. Everything was in Blink. But isolating iframes required extremely complex code in the main process to properly forward all DOM events between process. Then that code had to be made asynchronous so web pages could not block main UI.
Then OS interfaces to GPU and it’s architecture rules out having GPU accelerated graphics and decoders in a per-site process. So that must be put in single a GPU process. Surely it is heavy sandboxed. But, as with the recent Networking process, it is still a shared component with very complex C++ code and fat platform libraries in C/Objective-C for interfacing with GPU.
So at the end the original idea of writing everything in C++ and using sandboxed processes to make memory-safety bugs harmless just does not work. One needs a memory-safe language.
The article mentioned various library-based approaches. But those, as having such foreign C++ usage, are becoming essentially domain-specific-languages that one needs to learn. That leads to boilerplating as the host language is not well-suited for that.
- blub 6y agoThe idea of writing a constantly changing application and feeding it only untrusted content over the network while exposing more and more of the OS to that application does not work. It doesn't work in Firefox with its small block of Rust code, doesn't work in Chrome nor Safari. Because it's the dumbest fucking idea ever. But sure, at this point we don't have anything to lose by rewriting it in Rust/Swift/whatever.
- asiachick 6y agoAnd that alternative is what? you run no software on your computer? Native apps have way more access to your system then a webpage so I'm glad there are 100s or 1000s of web apps I can run rather then being forced to install native apps to get the same functionality.
- smnthermes 6y agoNot all web apps/websites need the same functionality. And not everyone wants shitty webapps [0][1], so desktop apps should not die. [0]: https://drewdevault.com/2016/11/24/Electron-considered-harmful.html https://drewdevault.com/2016/11/24/Electron-considered-harmf... [1]:https://tonsky.me/blog/disenchantment/ https://tonsky.me/blog/disenchantment/
- blub 6y agoAppStore / platform package manager. Web apps are anyway nonsense both from a privacy (zero privacy) and security PoV (single high-value target, foreign jurisdiction, crappy browsers, byzantine tools, hopelessly overcomplicated architectures etc).
- thePunisher 6y agoRewriting a browser is a memory-safe language (such as Rust) takes years if not decades. Case in point: Firefox. They've been rewriting parts of it in Rust for the last 6 years or so and they've only managed a little over 10%.
- SomeoneFromCA 6y agoWell Google is kinda more resourceful than Mozilla, so they could rewrite it but did not.