1. A computer-implemented method, comprising: executing a first piece of code in a sandboxed application that is written to a secured memory; receiving, as a result of executing the first piece of code, a request to insert a new piece of code into the sandboxed application; and in response to receiving the request: writing the new piece of code to a portion of the secured memory that cannot be executed by the sandboxed application; validating the new piece of code; and writing the validated piece of code to a portion of the secured memory that can be executed by the sandboxed application.