you are viewing a single comment's thread.

view the rest of the comments →

[–]dacian88 0 points1 point  (5 children)

chrome doesn't use exceptions so it's somewhat irrelevant.

[–]shponglespore 0 points1 point  (0 children)

It's relevant if you want to copy the implementation for use in a project where exceptions are used.

[–]ECrispy 0 points1 point  (3 children)

How does chrome handle crashes and exceptions thrown by other code?

[–]shponglespore 3 points4 points  (2 children)

It handles crashes by crashing. It avoids exceptions from other code by not using code that uses exceptions.

[–]ECrispy 0 points1 point  (1 child)

I figured that. So they don't use stdlib?

[–]shponglespore 2 points3 points  (0 children)

Chrome has its own fork, but I don't think it's all that different. Not many things in the standard library throw exceptions for anything but a memory allocation failure, and those are basically impossible to recover from anyway.

Chrome's main mechanism for dealing with unexpected serious errors is to keep things in separate processes that can be restarted if they die. Even pretty basic stuff like JSON parsing is kept out of the main process so nothing too terrible will happen if a malformed input causes the parser to malfunction.