Closed
Bug 1288276
Opened 9 years ago
Closed 8 years ago
closeProxyContext is never invoked
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox50 affected, firefox51 fixed)
RESOLVED
FIXED
mozilla51
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Whiteboard: triaged)
Attachments
(3 files)
http://searchfox.org/mozilla-central/rev/868b17897f7a7fcd7f6f67fd8185a7370db46604/toolkit/components/extensions/ExtensionUtils.jsm#1292
this.messageManager.sendAsyncMessage("Extension:CloseProxyContext", {childId: this.id});
does not match
http://searchfox.org/mozilla-central/rev/868b17897f7a7fcd7f6f67fd8185a7370db46604/toolkit/components/extensions/ExtensionUtils.jsm#1292
Services.mm.addMessageListener("API:CloseProxyContext", this, true);
And in an OOP world, the parent process should have minimal assumptions on the child process, in order to provide a better security. In this case, we should also dispose the proxy context if the child process terminates.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
> we should also dispose the proxy context if the child process terminates.
This is already handled by subscribing to message-manager-close and disposing its associated ProxyContexts.
The patch is easy, s/Extension:/API:/.
How can I add a regression test for this bug?
Flags: needinfo?(wmccloskey)
The only way I can think of where this might go wrong is if a content script used storage.local.onChanged.addListener. When the content page navigates, we could try to see if the listener fires after that.
Flags: needinfo?(wmccloskey)
Updated•9 years ago
|
Whiteboard: triaged
Assignee | ||
Comment 4•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67532/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67532/
Attachment #8775369 -
Flags: review?(wmccloskey)
Attachment #8775370 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 5•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67534/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67534/
Assignee | ||
Comment 6•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/67540/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67540/
Attachment #8775374 -
Flags: review?(wmccloskey)
Comment on attachment 8775374 [details]
Bug 1288276 - Add chromeScript.awaitOneMessage to SpecialPowers
https://reviewboard.mozilla.org/r/67540/#review65506
::: testing/specialpowers/content/specialpowersAPI.js:506
(Diff revision 1)
> let chromeScript = {
> addMessageListener: (name, listener) => {
> listeners.push({ name: name, listener: listener });
> },
>
> + awaitOneMessage: name => new Promise(resolve => {
promiseOneMessage might be a better name given how we've done stuff like this in the past.
Attachment #8775374 -
Flags: review?(wmccloskey) → review+
Attachment #8775370 -
Flags: review?(wmccloskey) → review+
Comment on attachment 8775370 [details]
Bug 1288276 - Add tests for background page context
https://reviewboard.mozilla.org/r/67534/#review65508
Comment on attachment 8775369 [details]
Bug 1288276 - Close proxy context upon page reload, with tests
https://reviewboard.mozilla.org/r/67532/#review65510
Attachment #8775369 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8775374 [details]
Bug 1288276 - Add chromeScript.awaitOneMessage to SpecialPowers
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67540/diff/1-2/
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8775369 [details]
Bug 1288276 - Close proxy context upon page reload, with tests
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67532/diff/1-2/
Assignee | ||
Comment 12•8 years ago
|
||
Comment on attachment 8775370 [details]
Bug 1288276 - Add tests for background page context
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67534/diff/1-2/
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 13•8 years ago
|
||
has problems to apply:
applying 6ed8aa4923ad
6ed8aa4923ad transplanted to 16513ef7dd8c
applying f968025c4ddc
patching file toolkit/components/extensions/test/mochitest/mochitest.ini
Hunk #1 FAILED at 29
1 out of 1 hunks FAILED -- saving rejects to file toolkit/components/extensions/test/mochitest/mochitest.ini.rej
patch failed to apply
abort: fix up the working directory and run hg transplant --continue
Flags: needinfo?(rob)
Keywords: checkin-needed
Assignee | ||
Comment 14•8 years ago
|
||
Comment on attachment 8775374 [details]
Bug 1288276 - Add chromeScript.awaitOneMessage to SpecialPowers
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67540/diff/2-3/
Assignee | ||
Comment 15•8 years ago
|
||
Comment on attachment 8775369 [details]
Bug 1288276 - Close proxy context upon page reload, with tests
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67532/diff/2-3/
Assignee | ||
Comment 16•8 years ago
|
||
Comment on attachment 8775370 [details]
Bug 1288276 - Add tests for background page context
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/67534/diff/2-3/
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(rob)
Keywords: checkin-needed
Comment 17•8 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/2ef8ee2d4bac
Add chromeScript.awaitOneMessage to SpecialPowers. r=billm
https://hg.mozilla.org/integration/fx-team/rev/d1cd8175cc47
Close proxy context upon page reload, with tests. r=billm
https://hg.mozilla.org/integration/fx-team/rev/a32b3e3c6b34
Add tests for background page context. r=billm
Keywords: checkin-needed
Comment 18•8 years ago
|
||
backed out for failing in tests like https://treeherder.mozilla.org/logviewer.html#?job_id=10987836&repo=fx-team
Flags: needinfo?(rob)
Comment 19•8 years ago
|
||
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/697966241877
Backed out changeset a32b3e3c6b34
https://hg.mozilla.org/integration/fx-team/rev/1e08d12783fb
Backed out changeset d1cd8175cc47
https://hg.mozilla.org/integration/fx-team/rev/ed55a2720142
Backed out changeset 2ef8ee2d4bac for failing on own test
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 23•8 years ago
|
||
Tests were failing because Android does not support the tabs API. I disabled the test for Android, rebased the patch and verified locally that no test failures are generated on Fennec. Please land it again.
Flags: needinfo?(rob)
Keywords: checkin-needed
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 26•8 years ago
|
||
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/edfb98ed711e
Add chromeScript.awaitOneMessage to SpecialPowers r=billm
https://hg.mozilla.org/integration/autoland/rev/9fcfe72d38fa
Close proxy context upon page reload, with tests r=billm
https://hg.mozilla.org/integration/autoland/rev/9017c54c3f57
Add tests for background page context r=billm
Keywords: checkin-needed
Comment 27•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/edfb98ed711e
https://hg.mozilla.org/mozilla-central/rev/9fcfe72d38fa
https://hg.mozilla.org/mozilla-central/rev/9017c54c3f57
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•