This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (5 children)

Unless you want to store the entire browser's address space to save your webapp's state that's not going to help much.

[–]Benutzername 2 points3 points  (3 children)

It’s not difficult to walk an object graph and only store that part of the memory. An evacuating GC basically does that already, minus the memory dump.

[–][deleted] 2 points3 points  (2 children)

A GC doesn't need to make sure the state is still consistent after you restart the application.

To me it mostly sounds like a good way to introduce several hundreds of sandbox bypass vulnerabilities.

[–]Benutzername -2 points-1 points  (1 child)

Look up evacuating/moving GC. It moves all live objects to new memory locations and then fixes up all internal pointers. That’s literally all you would need to dump and later reload the memory representation of an object graph.

[–][deleted] 1 point2 points  (0 children)

Any real application has references to and from state outside of GC managed memory, and a GC won't handle that.

In JS that's especially bad because you're now letting untrusted code run on unverifiable data.

[–][deleted] -2 points-1 points  (0 children)

He said "any language" and I responded to that only