a86fd1c2502d51b36d7e9d8b6c4e788002d205d7: Bug 1287007 - Enable proxying of most APIs. draft
Rob Wu <rob@robwu.nl> - Mon, 12 Sep 2016 21:19:53 -0700 - rev 428444
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Enable proxying of most APIs. MozReview-Commit-ID: KrI42XrsVVG
126af076764d9fc8a24210d54af12adc47426811: Bug 1287007 - Fix timing issue in test_ext_storage.js draft
Rob Wu <rob@robwu.nl> - Tue, 13 Sep 2016 00:45:00 -0700 - rev 428443
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Fix timing issue in test_ext_storage.js MozReview-Commit-ID: 63Ra7ThuHuf
bccf30481d359fe68637f6b6a9e487c88d99fdbc: Bug 1287007 - Fix "onclick" in contextMenus, to child. draft
Rob Wu <rob@robwu.nl> - Mon, 12 Sep 2016 18:26:03 -0700 - rev 428442
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Fix "onclick" in contextMenus, to child. Main thing: Making contextMenus implementation webext-oop compatible. Preparation: - Add getParentEvent to ChildAPIManager to allow use of remote events. - Introduce `addon_parent_only` to "allowedContexts" to only generate a schema API in the main process. - Do not fill in `null` for missing keys if the schema declares a key as `"optional": "omit-key-if-missing"`. This is needed for the second point in the next list. Drive-by fixes: - Ensure that the "onclick" handler is erased when a context closes. - Do not clear the "onclick" handler in `contextMenus.update` if the onclick key has been omitted (parity with Chrome). - Remove some unnecessary `Promise.resolve()` - Add extensive set of tests that check the behavior of the contextMenus APIs with regards to the onclick attribute in various scenarios. MozReview-Commit-ID: A5f3AUQzU8T
b7e7d17397f56582808bded171b0ffedd69e2dc2: Bug 1287007 - Move part of browserAction and pageAction to child draft
Rob Wu <rob@robwu.nl> - Sun, 11 Sep 2016 04:18:35 -0700 - rev 428441
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Move part of browserAction and pageAction to child And remove redundant `Promise.resolve()` because it is the default for async functions. setIcon is not supported on Android, so there was no need to change mobile/android/components/extensions/ext-pageAction.js. MozReview-Commit-ID: 94ebaJFxLAi
8797b10128a9f2123c53b9d57000f8e7e80231f7: Bug 1287007 - Set parent cloneScope to child cloneScope draft
Rob Wu <rob@robwu.nl> - Sun, 11 Sep 2016 03:10:21 -0700 - rev 428440
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Set parent cloneScope to child cloneScope This is only to help with migration. This change allows all APIs to behave identical regardless of whether the API is proxied. Change cloneScope to be a getter because cloneScope is `this.contentWindow`, which may be nulled when the context navigates away (but stays in the bfcache). Any API that is not proxied must have an identical clone scope to make sure that properties such as toJSON (in the native messaging stringifier) and ArrayBuffer (in webRequest as requestBody) are visible to the caller. MozReview-Commit-ID: 9aT3SUBieHK
206a577e675029584758314c892745dd6b368aec: Bug 1287007 - Track message manager / browser swaps draft
Rob Wu <rob@robwu.nl> - Fri, 09 Sep 2016 23:04:04 -0700 - rev 428439
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Track message manager / browser swaps Neither the message manager nor the XUL browser is guaranteed to be constant during a ProxyContext's lifetime. Add a new class to follow the `<browser>` belonging to the current docshell and update the ProxyContext properties as needed. NOTE: The `BrowserDocshellFollower` class assumes that docshells are swapped using `newBrowser.swapDocShells(oldBrowser)`. If this assumption turns out to be false, then the tracker will lose track of the `<browser>`. See bugzil.la/1301837 for more details. Also, renamed `messageManager` to `currentMessageManager` because the `messageManager` property is overwritten by the `setContentWindow` hack in WannabeChildAPIManager in ExtensionChild.jsm. browser/components/extensions/test/browser/browser_ext_currentWindow.js provides test coverage for this feature once the `test` API goes through a ChildAPIManager instead of directly through a WannabeChildAPIManager. Why? Because that test calls `test.onMessage.addListener` in the script that is loaded in a popup page. Popups are loaded in two stages: First the content is preloaded in a `<browser>`, and then when the popup is shown a new `<browser>` is created and the docshells are swapped. When the script runs while the popup script is being preloaded, the `ParentAPIManager` receives the IPC message with the target set to the `<browser>` used for preloading. When the API response is ready, `target.messageManager.sendAsyncMessage` is called. Meanwhile the docshells have been swapped, the message manager is gone and this fails. With this patch, the message manager is correctly tracked and this test passes. MozReview-Commit-ID: C5Z0ZJRXKyw
d71c4f0301c46fdbfa3257e97c03200ef9bfe9e5: Bug 1287007 - Use frame script to initialize background/popup page draft
Rob Wu <rob@robwu.nl> - Thu, 08 Sep 2016 20:41:43 -0700 - rev 428438
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Use frame script to initialize background/popup page MozReview-Commit-ID: 8Di1nTnwpbU
a87e1dc8643455fb72fe04ca53f41ea82963cc48: Bug 1287007 - Only close extension tabs upon shutdown draft
Rob Wu <rob@robwu.nl> - Thu, 08 Sep 2016 19:02:56 -0700 - rev 428437
Push 33305 by bmo:rob@robwu.nl at Sun, 23 Oct 2016 20:56:25 +0000
Bug 1287007 - Only close extension tabs upon shutdown In one of the previous patches, the viewType of popup changed from "popup" to "tab". As a result it was closed by the `page-shutdown` event handler in ext-tabs.js. This prevents that from happening. Also added a test that checks whether the options page type is a tab, to prevent future regressions. MozReview-Commit-ID: 3Qcf08PgNqb
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
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 +300000 tip