2eac95f806a789f9e6bf42132a8e5a623de0573d: Bug 1287007 - Set the principal in ChildAPIManager draft
Rob Wu <rob@robwu.nl> - Wed, 07 Sep 2016 20:35:39 -0700 - rev 428436
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Set the principal in ChildAPIManager The `browser.downloads.download` API takes a "url" parameter. The schema file at downloads.json defines the type to be "url". This means that the parameter is checked with `context.checkLoadURL(url)` in Schemas.jsm. This method uses the principal of the object that was passed to `Schemas.inject`. Currently, this works just fine because the `schemaWrapper` in Extension.jsm returns the context's principal. But when we move to using the ChildAPIManager, the principal is not defined and Schemas.jsm will fall back to a Null principal. As a result, the test_ext_downloads_download.js fails because the blob:-URL with the extension origin cannot be loaded by a null principal. To fix this, the context's principal must be set. MozReview-Commit-ID: FmpqYfPemyY
2cb89c1b0f273070d2279d94aa074507faeb576a: Bug 1287007 - Remove dead code draft
Rob Wu <rob@robwu.nl> - Tue, 06 Sep 2016 15:50:50 -0700 - rev 428435
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Remove dead code MozReview-Commit-ID: LtuKY5DjB68
a14afbabb0f8454e01c66e6bd70530a1083ccd57: Bug 1287007 - Use child's Extension instead of the process' draft
Rob Wu <rob@robwu.nl> - Tue, 06 Sep 2016 15:31:33 -0700 - rev 428434
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Use child's Extension instead of the process' MozReview-Commit-ID: 9o8tOuUbchn
88fe80a6f328e5f7fdd75de4a50aa704d3cc6a84: Bug 1287007 - Fix test_ext_api_permissions.js draft
Rob Wu <rob@robwu.nl> - Wed, 07 Sep 2016 17:10:33 -0700 - rev 428433
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Fix test_ext_api_permissions.js "extension.views" will only be available in content, so use the "proxy-context-load" event to detect new views. MozReview-Commit-ID: K86Be5IDk42
9a72feb1575e564a58c78c2f62fc9e090c65f711: Bug 1287007 - Use IPC to share viewType, tabId and windowId draft
Rob Wu <rob@robwu.nl> - Tue, 06 Sep 2016 15:25:10 -0700 - rev 428432
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Use IPC to share viewType, tabId and windowId Accessing <browser> in ContentChild does not work when extensions run in a separate process. MozReview-Commit-ID: EK0aOYeGaZ5
be221f14b23df3749dbea8fafee2d0d07cbd3fae: Bug 1287007 - Fix timing issue in browser_ext_tabs_getCurrent.js draft
Rob Wu <rob@robwu.nl> - Tue, 06 Sep 2016 14:45:58 -0700 - rev 428431
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Fix timing issue in browser_ext_tabs_getCurrent.js browser.test.sendMessage does not have enough time to finish before tabs.remove since test moved to ChildAPIManager for extension pages, causing the test to time out. MozReview-Commit-ID: 1mmGZOi9fzm
e78174dc7c7595e70a514ba50dddb901fe74aa44: Bug 1287007 - Move extension context initialization to ExtensionContent draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 23:50:11 -0700 - rev 428430
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Move extension context initialization to ExtensionContent This is a simple move of ExtensionContext creation logic to ExtensionChild. Before the change, ExtensionContext was initialized as follows: 1. (ext-backgroundPage.js) Create background page 2. (Extension.jsm) document-element-inserted observed. 3. (Extension.jsm) new ExtensionContext + unload observer. After this commit: 1. (ext-backgroundPage.js) Create background page 2. (ext-backgroundPage.js) emit extension-browser-inserted event 3. (Extension.jsm) Pass global to ExtensionContent + unload listener. 4. (ExtensionContent.jsm) document-element-inserted observed. 5. (ExtensionChild.jsm) new ExtensionContext The next step is to use frame scripts and synchronize state. MozReview-Commit-ID: K6mPdq7KQ2T
2956bd9354eba1b49e30a7b07ca41c19920b1659: Bug 1287007 - Move extension.getViews to child draft
Rob Wu <rob@robwu.nl> - Wed, 07 Sep 2016 22:54:07 -0700 - rev 428429
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Move extension.getViews to child MozReview-Commit-ID: SG2pmulzaP
abc42f270dd242499e12f65a15341dc3226a0192: Bug 1287007 - Move background page API logic to child draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 22:34:44 -0700 - rev 428428
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Move background page API logic to child MozReview-Commit-ID: iGROahhkhn
b8990fffd3c578867cec20a91404533bbc3c7a78: Bug 1287007 - Rename "context.type" to "context.viewType" draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 22:26:56 -0700 - rev 428427
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Rename "context.type" to "context.viewType" "viewType" is more easily searchable and not as ambiguous as "type". MozReview-Commit-ID: 8sG4qagFCBu
3e1ff77c2b8dd907eed9f11c026ac84d408a2fb3: Bug 1287007 - Introduce ChildAPIManager to addon code draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 18:57:38 -0700 - rev 428426
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Introduce ChildAPIManager to addon code This is the bare minimum to separate the generation of addon_parent and addon_child APIs. Now it is possible to have methods with the same name but different implementations in the parent and child. Many APIs are not compatible with the proxied API implementation, so they temporarily fall back to directly invoking the parent API, just as before this commit. MozReview-Commit-ID: fwuZUvD8tY
df56da06ad5af935c8c014ad1c4159cb19831d9a: Bug 1287007 - Do not neuter error messages from the same principal draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 17:04:28 -0700 - rev 428425
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Do not neuter error messages from the same principal With an upcoming change that introduces another ProxyContext, errors from a different scope may bubble up. These messages should be reported, not replaced with "An unexpected error occurred". MozReview-Commit-ID: ByUktVkhDyx
380ffd2ca43754d6acbe29ed3c551657db9d8ea1: Bug 1287007 - Move ExtensionContext to separate file draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 00:15:18 -0700 - rev 428424
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Move ExtensionContext to separate file This is just a mechanical change, literally nothing more than cutting ExtensionContext from Extension.jsm, pasting it in ExtensionChild.jsm and adding the minimal imoort boilerplate. MozReview-Commit-ID: 5uVt1IOdEFU
bdbd3e0e69d835df186cca503cf49827d23ca150: Bug 1287007 - Fix cross-process browser.storage.local serialization draft
Rob Wu <rob@robwu.nl> - Sun, 04 Sep 2016 19:19:17 -0700 - rev 428423
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Fix cross-process browser.storage.local serialization - Lazily initialize file IO-specific stuff in ExtensionStorage.jsm, and limit this work to the main process. - Add local versions of the `storage.local.get` and `storage.local.set` implementations that perform sanitization (without the change, values are improperly serialized over IPC). - Copied the `backgroundScript` test from xpcshell/test_ext_storage.js to mochitest/test_ext_storage_content.html because they should behave identical. Before this patch the test failed due to IPC serialization issues, now the test passes. Note that the old test also passes with the changes. MozReview-Commit-ID: 8J8CCdwMACN
a2b9b7f83a4170cb4b3cdbd0c43657f392aa93fc: Bug 1287007 - Derive context.principal from sandbox r?billm draft
Rob Wu <rob@robwu.nl> - Fri, 30 Sep 2016 19:16:34 +0200 - rev 428422
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Derive context.principal from sandbox r?billm `context.principal` should be equal to the principal of the sandbox, so that if a new sandbox is created using `Cu.Sandbox(principal)`, that objects can be shared between the new sandbox and `context.cloneScope` (= `context.sandbox`) without issues. Without this change, using `context.jsonStringify` on an object from a content script would trigger the following error: > Error: Permission denied to access property "toJSON" This scenario is covered by the test toolkit/components/extensions/test/mochitest/test_ext_storage_content.html in the next commit. MozReview-Commit-ID: E4Jt8TDwNAZ
e743084bb22e5433f416ca0f4937c8a969d1b060: Bug 1287007 - Allow local implementations to call remote implementations draft
Rob Wu <rob@robwu.nl> - Sun, 04 Sep 2016 02:29:48 -0700 - rev 428421
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Allow local implementations to call remote implementations - Add callParentFunctionNoReturn / callParentAsyncFunction to ChildAPIManager to implement remote calls. - Add in-process browser.test implementation that uses this. - Add tests to verify that the browser.test.assert* methods with the `allowAmbiguousOptionalArguments` schema attribute are working with objects that cannot be passed as-is over IPC. (except test.sendMessage, because stringifying the arguments has an observable impact on test behavior) MozReview-Commit-ID: 6cFVgmFfU93
82e419f1caa796a9b13a8163d2ee5fc0aa6f3529: Bug 1287007 - Mark all browserAction methods as async draft
Rob Wu <rob@robwu.nl> - Fri, 02 Sep 2016 14:22:09 -0700 - rev 428420
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Mark all browserAction methods as async E.g. browser.browserAction.enable(...).then(...) now works as expected. Removed a Promise.resolve() because that is the default. MozReview-Commit-ID: 4Shxtn0rjYH
59488359cf7c3b141e4550cf6d11e86199c15dc6: Bug 1287007 - Require "async" in schemas to match name draft
Rob Wu <rob@robwu.nl> - Fri, 02 Sep 2016 03:37:55 -0700 - rev 428419
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Require "async" in schemas to match name In the pageAction and browserAction schemas, several methods are declared with `"async": true` but without a specified callback in the `"parameters"` object, so callbacks are not allowed. However, when a callback is proxied, the `ParentAPIManager` will mirror the call by passing in an extra callback to the proxied API - and break. This patch fixes the issue by removing uses of async:true. Also for consistency between the browserAction and pageAction methods, the methods that were not declared as async have also been marked as async. MozReview-Commit-ID: JQqzmTUAotB
0dc7324462f87f001e99dba0ad1d869ee3692e89: Bug 1287007 - Fix timing issue in browser/page action tests draft
Rob Wu <rob@robwu.nl> - Fri, 02 Sep 2016 16:33:32 -0700 - rev 428418
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Fix timing issue in browser/page action tests MozReview-Commit-ID: 9L0ttaq42Ga
9cc4f92f5de4676ae0db3623a080d9c4cdcc8f6a: Bug 1287007 - Refactor test_ext_schemas_api_injection.js draft
Rob Wu <rob@robwu.nl> - Fri, 02 Sep 2016 05:36:33 -0700 - rev 428417
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Refactor test_ext_schemas_api_injection.js When the background API move to a separate implementation, then the schema APIs will be generated (and ChildAPIManager will just delegate the implementation to the parent process). The purpose of the test is to verify that nested namespaces and null-feturn values work, so just use the base classes instead of a concrete implementation for BaseContext / SchemaAPIManager instead of setting up a full extension. MozReview-Commit-ID: CB5s7Ae24zS
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 +300000 tip