608c0e0ae302b274ac2d1f1a75cfeef1274c764c: Bug 1287007 - Rename "context.type" to "context.viewType" draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 22:26:56 -0700 - rev 411573
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +0000
Bug 1287007 - Rename "context.type" to "context.viewType" "viewType" is more easily searchable and not as ambiguous as "type". MozReview-Commit-ID: 8sG4qagFCBu
5a1c501206954ee267e0c0194888864b9939ef6f: Bug 1287007 - Introduce ChildAPIManager to addon code draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 18:57:38 -0700 - rev 411572
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +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
c57955ed6c9f96709a0e9c9dc39fb441b2fcea4e: 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 411571
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +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
8efb68e604a3194d4e1f1ae4649fde6a906dfd5d: Bug 1287007 - Move ExtensionContext to separate file draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 00:15:18 -0700 - rev 411570
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +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
2375041b43b50d7b5694415f8f5ada481fbc370d: Bug 1287007 - Harden browser.storage.local serialization draft
Rob Wu <rob@robwu.nl> - Sun, 04 Sep 2016 19:19:17 -0700 - rev 411569
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +0000
Bug 1287007 - Harden 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). - Switch from JSON.stringify to a custom serializer, because: - The serialization of the value is affected by the context's override of methods such as `toJSON` and `toString`. - Nested objects with function values trigger the following error: > XrayWrapper denied access to property "foo" (reason: value is callable). > See https://developer.mozilla.org/en-US/docs/Xray_vision for more > information. Note that only the first denied property access from a > given global object will be reported. - 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
ed784fd3cb2776fe1dd1a77ebef5730b95a6a4fc: Bug 1287007 - Allow local implementations to call remote implementations draft
Rob Wu <rob@robwu.nl> - Sun, 04 Sep 2016 02:29:48 -0700 - rev 411568
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +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
ab05e2eb28f16bab0f0f855b1a6fc68806260e02: Bug 1287007 - Mark all browserAction methods as async draft
Rob Wu <rob@robwu.nl> - Fri, 02 Sep 2016 14:22:09 -0700 - rev 411567
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +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
4a2a8cdb7bb58f514ecb737940b71300fe185820: Bug 1287007 - Require "async" in schemas to match name draft
Rob Wu <rob@robwu.nl> - Fri, 02 Sep 2016 03:37:55 -0700 - rev 411566
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +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
68ff5c3f3b7b6e29fa563a9416d29d7122472e7a: 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 411565
Push 28924 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:54:39 +0000
Bug 1287007 - Fix timing issue in browser/page action tests MozReview-Commit-ID: 9L0ttaq42Ga
129f9ebcfe0c34803f82566a28aa60412cb6ceeb: Bug 1301317 - Don't build telephony API without MOZ_B2G_RIL. r?fabrice draft
Makoto Kato <m_kato@ga2.so-net.ne.jp> - Thu, 08 Sep 2016 17:14:53 +0900 - rev 411564
Push 28923 by m_kato@ga2.so-net.ne.jp at Thu, 08 Sep 2016 08:51:20 +0000
Bug 1301317 - Don't build telephony API without MOZ_B2G_RIL. r?fabrice MozReview-Commit-ID: 6nz11ui3xsL
37e8ed7cb027293a4f72c989113024bdb5bf07ec: Bug 1287007 - Set the principal in ChildAPIManager draft
Rob Wu <rob@robwu.nl> - Wed, 07 Sep 2016 20:35:39 -0700 - rev 411563
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +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
1e14b8075658f11a523c6a8550800ab989aa5f2d: Bug 1287007 - Remove dead code draft
Rob Wu <rob@robwu.nl> - Tue, 06 Sep 2016 15:50:50 -0700 - rev 411562
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +0000
Bug 1287007 - Remove dead code MozReview-Commit-ID: LtuKY5DjB68
3bef51b87130787241687b6c5de174740160dd26: 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 411561
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +0000
Bug 1287007 - Use child's Extension instead of the process' MozReview-Commit-ID: 9o8tOuUbchn
8892fd45b9eda3d670d0181fc5ee79a2c7094832: Bug 1287007 - Fix test_ext_api_permissions.js draft
Rob Wu <rob@robwu.nl> - Wed, 07 Sep 2016 17:10:33 -0700 - rev 411560
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +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
7cda1873a83ad40eb088d86d77f68c90f4d920d1: 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 411559
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +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
21f5c7656f50866a02c2e3806fc4047c0e6407a1: 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 411558
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +0000
Bug 1287007 - Fix timing issue in browser_ext_tabs_getCurrent.js browser.test.sendMessage goes through the ChildAPIManager, whereas tabs.remove is currently a direct call MozReview-Commit-ID: 1mmGZOi9fzm
151436b11b91267bef9183ac00d70ab894e38b7b: Bug 1287007 - Move extension context initialization to ExtensionContent draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 23:50:11 -0700 - rev 411557
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +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
8699ea7b9d6ec7691d586d4aed09e962aa17d949: Bug 1287007 - Move extension.getViews to child draft
Rob Wu <rob@robwu.nl> - Wed, 07 Sep 2016 22:54:07 -0700 - rev 411556
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +0000
Bug 1287007 - Move extension.getViews to child MozReview-Commit-ID: SG2pmulzaP
af16dba6990aa0b33a7e841a9db29026b3b2c686: Bug 1287007 - Move background page API logic to child draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 22:34:44 -0700 - rev 411555
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +0000
Bug 1287007 - Move background page API logic to child MozReview-Commit-ID: iGROahhkhn
da1534dc164642e1a34047952d8ea753948fd705: Bug 1287007 - Rename "context.type" to "context.viewType" draft
Rob Wu <rob@robwu.nl> - Mon, 05 Sep 2016 22:26:56 -0700 - rev 411554
Push 28922 by bmo:rob@robwu.nl at Thu, 08 Sep 2016 08:44:00 +0000
Bug 1287007 - Rename "context.type" to "context.viewType" "viewType" is more easily searchable and not as ambiguous as "type". MozReview-Commit-ID: 8sG4qagFCBu
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 +300000 tip