Method and system for executing applications using native code modules
AssigneeGoogle Inc.
InventorsEvangelos Kokkevis, Matthew Papakipos, David C. Sehr
Life of this patent
Estimating the term…
Abstract
Some embodiments provide a system that executes a web application. During operation, the system loads the web application in a web browser and loads a native code module associated with the web application into a secure runtime environment. Next, the system provides input data associated with the web application to the native code module and processes the input data using the native code module to obtain output data. Finally, the system provides the output data to the web application for use by the web application.
Claims18
A method comprising:
- loading a web application in a web browser in a computing system;
- loading a native code module associated with the web application into a secure runtime environment of the computing system, wherein the native code module i) comprises binary code that runs directly on hardware in the computing system, ii) is executable in a plurality of instruction set architectures, and iii) comprises corresponding mechanisms for executing the native code module in each of the plurality of instruction set architectures;
- executing, in the secure runtime environment, a plurality of native code modules in isolation from one another, the plurality of native code modules including the native code module, by executing the native code module in isolation from the other native code modules in the plurality of native code modules;
- moderating, by the secure runtime environment, which system resources of the computing system can be accessed by the native code module and how the system resources are accessed, wherein the native code module can access system resources of the computing system only through the secure runtime environment by:
- initiating, by the secure runtime environment on behalf of the native code module, a communication between the native code module and the web application running on the computing system;
- and
- mediating, by the secure runtime environment, the communication, including placing the output data in a shared memory buffer that is readable by the web application on the computing system for use by the web application, the moderating comprising one or more of the following:
- performing, by the secure runtime environment, a read of a file system state on behalf of the native code module;
- performing, by the secure runtime environment, a change of the file system state on behalf of the native code module;
- initiating, by the secure runtime environment, a network communication on behalf of the native code module;
- initiating, by the secure runtime environment, an inter-module communication on behalf of the native code module;
- or
- initiating, by the secure runtime environment, an inter-process communication on behalf of the native code module;
- providing input data associated with the web application to the native code module;
- and
- processing the input data, by executing the native code module directly on hardware in the computing system, to obtain output data.
A system comprising:
- a web browser, installed on a computing system, configured to load a web application;
- and
- a native code module associated with the web application, wherein the native code module i) comprises binary code that runs directly on hardware in the computing system, ii) is executable in a plurality of instruction set architectures, and iii) comprises corresponding mechanisms for executing the native code module in each of the plurality of instruction set architectures;
- and
- a secure runtime environment configured to execute a plurality of native code modules in isolation from one another, the plurality of native code modules including the native code module, by executing the native code module in isolation from the other native code modules in the plurality of native code modules, wherein the secure runtime environment moderates which system resources of the computing system can be accessed by the native code module and how the system resources are accessed, and wherein the native code module can access system resources of the computing system only through the secure runtime environment by:
- initiating, by the secure runtime environment on behalf of the native code module, a communication between the native code module and the web application running on the computing system;
- and
- mediating, by the secure runtime environment, the communication, including placing the output data in a shared memory buffer that is readable by the web application on the computing system for use by the web application, the moderating comprising one or more of the following:
- performing, by the secure runtime environment, a read of a file system state on behalf of the native code module;
- performing, by the secure runtime environment, a change of the file system state on behalf of the native code module;
- initiating, by the secure runtime environment, a network communication on behalf of the native code module;
- initiating, by the secure runtime environment, an inter-module communication on behalf of the native code module;
- or
- initiating, by the secure runtime environment, an inter-process communication on behalf of the native code module;
- wherein the native code module is configured to:
- obtain input data associated with the web application;
- and
- process the input data, by executing directly on hardware in the computing system, to obtain output data.
A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method comprising:
- loading a web application in a web browser at a computing system;
- loading a native code module associated with the web application into a secure runtime environment of the computing system, wherein the native code module i) comprises binary code that runs directly on hardware in the computing system, ii) is executable in a plurality of instruction set architectures, and iii) comprises corresponding mechanisms for executing the native code module in each of the plurality of instruction set architectures;
- executing, in the secure runtime environment, a plurality of native code modules in isolation from one another, the plurality of native code modules including the native code module, by executing the native code module in isolation from the other native code modules in the plurality of native code modules;
- moderating, by the secure runtime environment, which system resources of the computing system can be accessed by the native code module and how the system resources are accessed, wherein the native code module can access system resources of the computing system only through the secure runtime environment by:
- initiating, by the secure runtime environment on behalf of the native code module, a communication between the native code module and the web application running on the computing system;
- and
- mediating, by the secure runtime environment, the communication, including placing the output data in a shared memory buffer that is readable by the web application on the computing system for use by the web application, the moderating comprising one or more of the following:
- performing, by the secure runtime environment, a read of a file system state on behalf of the native code module;
- performing, by the secure runtime environment, a change of the file system state on behalf of the native code module;
- initiating, by the secure runtime environment, a network communication on behalf of the native code module;
- initiating, by the secure runtime environment, an inter-module communication on behalf of the native code module;
- or
- initiating, by the secure runtime environment, an inter-process communication on behalf of the native code module;
- providing input data associated with the web application to the native code module;
- and
- processing the input data, by executing the native code module directly on hardware in the computing system, to obtain output data.
Dependencies are inferred from the claim text.