[webkit-dev] Deep copy of the page with it's JS context

Filip Pizlo fpizlo at apple.com
Wed Dec 19 14:41:40 PST 2012


What you describe is super hard to do.  Not just in WebKit but in any system.  The classical approach involves some combination of checkpointing (what you seem to call "deep copy" - though the words "deep" and "copy" don't accurately describe the technical challenge - there's no way for WebKit to "deep copy" the universe surrounding your computer in order to capture the state of the interwebs so as to allow you to time travel backwards) and record/replay.

Record/replay has been done, on top of WebKit; though to my knowledge no part of this has ever been up-streamed to WebKit itself:
http://homes.cs.washington.edu/~burg/
http://homes.cs.washington.edu/~burg/projects/timelapse/

Brian's documentation on Timelapse seems to include some pointers on how you'd need to do this if you wanted to reproduce his efforts.  He also has all of the code available if you want to use it as a starting point.

For further information, I'd suggest contacting Brian directly as using webkit-dev for this kind of discussion is a bit of a stretch.

-F


On Dec 12, 2012, at 11:03 AM, Николай Матюнин wrote:

> Dear WebKit developers!
> 
> I need your help (or just some advice).
> Currently I use WebKit (actually phantom.JS, which is based on the WebKit) as an instrument to research and develop the effective methods of ajax web-applications crawling (just for academic purposes).
> 
> So, during the crawling, the application changes it's state after some event was fired by the crawler. Then crawler should go back to the previous state, to fire another event (and to get one more possible state), and so on. 
> 
> Thus, I'd like to have the possibility to make a deep copy of the page current state, including not only DOM tree copy, but also entire JavaScript context of the page.
> I have successfully (to a certain degree) achieved this goal with HtmlUnit and Rhino JS engine, but Rhino is not supported in any real modern browser, so I want to use WebKit (and JavaScriptCore or V8 JS engine).
> 
> Can I achieve this goal with WebKit? Is it possible technically? (As I see, this "hack" was not supposed by design, most classes in source code are not copyable and so on). Which classes I should consider first?
> Maybe, it's better (and more simply) to use V8 engine (than JSC) to achieve this goal?
> 
> Thanks a lot!
> Sincerely,
> Nikolay Matyunin.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121219/f12a219a/attachment.html>


More information about the webkit-dev mailing list