|
|
| Line 103: |
Line 103: |
| "moz-package-location":"https://example.com/myapp/app.pak" | | "moz-package-location":"https://example.com/myapp/app.pak" |
| } | | } |
|
| |
| == Processing Model ==
| |
| THIS SECTION IS OUT OF DATE.
| |
|
| |
| When an app-manifest is encountered, while the page is loaded as normal, additional steps are initiated in parallel. Two main processes are started:
| |
| - populating cache with app enumerated resources
| |
| - verification of signed resources and granting of permissions
| |
|
| |
| The normal loading process is:
| |
| #Gecko loads the manifest
| |
| #Gecko checks the signature of the manifest
| |
| #If signature verifies, a privileged child process is launched
| |
| #Web page is loaded as a normal web page inside this privileged process
| |
| #Although the _process_ is privileged, permission are restricted until verification is complete (i.e. ALL resources enumerated in the manifest have been loaded and passed integrity checks)
| |
|
| |
| The verification process is as follows:
| |
| # After the manifest signature checks out, gecko starts downloading all files enumerated in the manifest
| |
| # Each resource has is checked against a digest from the manifest
| |
| # If the integrity check passes, the resource is cached
| |
| # Once all the resources have been cached, only then is content considered privileged and permissions available to it
| |
| #TODO: How do we enable permissions in a lazy manner? (ie after the window is already loaded)
| |
|
| |
| To update a privileged app:
| |
|
| |
| 2.2. Update
| |
| # GET manifest, If-Modified-Since
| |
| # Look for what files have changed, by addition/deletion/integrity
| |
| # Update changed files
| |
|
| |
| Verification failures are generally treated as network failures. See "Error Recovery" below for the approach to dealing with loading errors and partially loaded apps.
| |
|
| |
|
| == Cache population == | | == Cache population == |