Enhancing JavaScript with Transactions

Mohan Dhawan, Chung-chieh Shan, Vinod Ganapathy.

Proceedings of the 26th European Conference on Object-Oriented Programming (ECOOP 2012). Published as Volume 7313 of Lecture Notes in Computer Science (LNCS), pages 383--408; Beijing, China; June 11-16, 2012.

Transcript is a system that enhances JavaScript with support for transactions. Hosting Web applications can use transactions to demarcate regions that contain untrusted guest code. Actions performed within a transaction are logged and considered speculative until they are examined by the host and committed. Uncommitted actions simply do not take and cannot affect the host in any way. Transcript therefore provides hosting Web applications with powerful mechanisms to understand the behavior of untrusted guests, mediate their actions and also cleanly recover from the effects of security-violating guest code.

This paper describes the design of Transcript and its implementation in Firefox. Our exposition focuses on the novel features introduced by Transcript to support transactions, including a suspend/resume mechanism for JavaScript and support for speculative DOM updates. Our evaluation presents case studies showing that Transcript can be used to enforce powerful security policies on untrusted JavaScript code, and reports its performance on real-world applications and microbenchmarks.

Paper: [ PDF ] (© Springer)
Slides: [ Powerpoint ]
DOI: [ 10.1007/978-3-642-31057-7_18 ]


Papers page