teampoltergeist/poltergeist — pull request #565 by bri3d (2014-12-30 19:02:49+00:00)
Title: Issue 564

This is the fix for #564, in which the mutable state set on the Browser was not persisted on the Ruby side and reset after a client restart.

It looks like this issue was discovered and fixed for 'debug' already but 'js_errors' and 'extensions' remained.

This seems like a mildly brittle strategy as every piece of mutable state (setter) on the Browser needs to be handled this way going forward, but I couldn't think of a way to make it happen 'magically' without moving a lot of restart logic to the Driver or winning the Terrible Metaprogramming Olympic Games.