Closed Bug 1488971 Opened 6 years ago Closed 6 years ago

Externally start and stop the WebExtension when the pref is flipped

Categories

(Firefox :: Screenshots, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: jhirsch, Assigned: aswan)

References

Details

Attachments

(1 file)

Screenshots can be disabled by setting the `extensions.screenshots.disabled` pref to `true`. Currently, the bootstrap part of the Screenshots embedded webextension manages this itself: when the pref is changed, the embedded webextension is started/shutdown, and the Photon Library button and page action are separately created/removed.

As part of the move to a pure webextension, rather than move this pref observer / UI management code into an embedded API internal to the Screenshots webextension, the addons team would prefer to land code directly in the browser to start/stop the webextension in response to changes to the pref.
Flags: needinfo?(aswan)
Assignee: nobody → aswan
Flags: needinfo?(aswan)
Comment on attachment 9007353 [details]
Bug 1488971 Move logic for disabling screenshots out of the extension r=kmag,_6a68

Kris Maglione [:kmag] has approved the revision.
Attachment #9007353 - Flags: review+
Comment on attachment 9007353 [details]
Bug 1488971 Move logic for disabling screenshots out of the extension r=kmag,_6a68

Jared Hirsch [:_6a68] [:jhirsch] has approved the revision.
Attachment #9007353 - Flags: review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8de31323a3b52d7f4d6abd9405ba64e2227a653
Bug 1488971 Move logic for disabling screenshots out of the extension r=kmag,_6a68
Backed out changeset a8de31323a3b (Bug 1488971) for bc failures in browser/components/uitour/test/browser_UITour_availableTargets.js

Failure: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&fromchange=063d1353ec22875c51b7b58e0f23806d0c5f0fdf&filter-classifiedState=unclassified&selectedJob=198702574

Failure logs: 

https://treeherder.mozilla.org/logviewer.html#?job_id=198702574&repo=mozilla-inbound&lineNumber=2702

https://treeherder.mozilla.org/logviewer.html#?job_id=198710714&repo=mozilla-inbound&lineNumber=3264

[task 2018-09-11T19:01:16.141Z] 19:01:16     INFO - *** Start BrowserChrome Test Results ***
[task 2018-09-11T19:01:16.197Z] 19:01:16     INFO - checking window state
[task 2018-09-11T19:01:16.234Z] 19:01:16     INFO - TEST-START | browser/extensions/screenshots/test/browser/browser_screenshots_ui_check.js
[task 2018-09-11T19:02:01.246Z] 19:02:01     INFO - TEST-INFO | started process screentopng
[task 2018-09-11T19:02:01.812Z] 19:02:01     INFO - TEST-INFO | screentopng: exit 0
[task 2018-09-11T19:02:01.812Z] 19:02:01     INFO - Buffered messages logged at 19:01:16
[task 2018-09-11T19:02:01.812Z] 19:02:01     INFO - Entering test bound 
[task 2018-09-11T19:02:01.812Z] 19:02:01     INFO - Screenshots is not enabled
[task 2018-09-11T19:02:01.812Z] 19:02:01     INFO - Set Screenshots disabled pref to false.
[task 2018-09-11T19:02:01.813Z] 19:02:01     INFO - Buffered messages finished
[task 2018-09-11T19:02:01.814Z] 19:02:01     INFO - TEST-UNEXPECTED-FAIL | browser/extensions/screenshots/test/browser/browser_screenshots_ui_check.js | Test timed out - 
[task 2018-09-11T19:02:01.815Z] 19:02:01     INFO - GECKO(7309) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2018-09-11T19:02:01.815Z] 19:02:01     INFO - GECKO(7309) | MEMORY STAT | vsize 1822MB | residentFast 243MB | heapAllocated 77MB
[task 2018-09-11T19:02:01.816Z] 19:02:01     INFO - TEST-OK | browser/extensions/screenshots/test/browser/browser_screenshots_ui_check.js | took 45027ms
[task 2018-09-11T19:02:01.819Z] 19:02:01     INFO - checking window state
[task 2018-09-11T19:02:02.964Z] 19:02:02     INFO - GECKO(7309) | Completed ShutdownLeaks collections in process 7496
[task 2018-09-11T19:02:02.993Z] 19:02:02     INFO - GECKO(7309) | Completed ShutdownLeaks collections in process 7450
[task 2018-09-11T19:02:03.001Z] 19:02:03     INFO - GECKO(7309) | Completed ShutdownLeaks collections in process 7404
[task 2018-09-11T19:02:03.002Z] 19:02:03     INFO - GECKO(7309) | Completed ShutdownLeaks collections in process 7383
[task 2018-09-11T19:02:03.294Z] 19:02:03     INFO - GECKO(7309) | Completed ShutdownLeaks collections in process 7309
[task 2018-09-11T19:02:03.295Z] 19:02:03     INFO - TEST-START | Shutdown
[task 2018-09-11T19:02:03.295Z] 19:02:03     INFO - Browser Chrome Test Summary
Flags: needinfo?(aswan)
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/465708f1cf74
Backed out changeset a8de31323a3b for bc failures in browser/components/uitour/test/browser_UITour_availableTargets.js
Attachment #9007353 - Attachment description: Bug 1488971 Move logic for disabling screenshots out of the extension → Bug 1488971 Move logic for disabling screenshots out of the extension r=kmag,_6a68
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef0c065ebe0fc1918816718d45dc7e2a42545b06
Bug 1488971 Move logic for disabling screenshots out of the extension r=kmag,_6a68
Backed out changeset ef0c065ebe0f (bug 1488971) for browser-chrome failures on browser/base/content/test/performance/browser_preferences_usage.js. CLOSED TREE 

Push: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=efe2d390bdc5ce329ef10e45699026b122e3525b

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=198916996&repo=mozilla-inbound&lineNumber=2934

12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | Whitelist item layout.css.dpi should be accessed at most 75 times. - 63 <= 75 - 
12:12:46     INFO - Buffered messages finished
12:12:46     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/performance/browser_preferences_usage.js | chrome.override_package.global should not be accessed more than 40 times. - 47 <= 40 - JS frame :: chrome://mochitests/content/browser/browser/base/content/test/performance/browser_preferences_usage.js :: checkPrefGetters :: line 34
12:12:46     INFO - Stack trace:
12:12:46     INFO - chrome://mochitests/content/browser/browser/base/content/test/performance/browser_preferences_usage.js:checkPrefGetters:34
12:12:46     INFO - chrome://mochitests/content/browser/browser/base/content/test/performance/browser_preferences_usage.js:startup:109
12:12:46     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1102
12:12:46     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1093
12:12:46     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
12:12:46     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:795
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | bidi.edit.caret_movement_style should not be accessed more than 40 times. - 28 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | bidi.numeral should not be accessed more than 40 times. - 27 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | bidi.browser.ui should not be accessed more than 40 times. - 27 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | font.size.cursive.x-western should not be accessed more than 40 times. - 26 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | bidi.direction should not be accessed more than 40 times. - 26 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | font.name.variable.x-western should not be accessed more than 40 times. - 26 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | image.animation_mode should not be accessed more than 40 times. - 26 <= 40 - 
12:12:46     INFO - TEST-PASS | browser/base/content/test/performance/browser_preferences_usage.js | font.size.monospace.x-western should not be accessed more than 40 times. - 26 <= 40 - 

Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/507b60746ff7ddca3a6d7237694665a448eb75ab
https://hg.mozilla.org/integration/mozilla-inbound/rev/3113a83b34557d35bdfb54f08c72c937a0980b38
Bug 1488971 Move logic for disabling screenshots out of the extension r=kmag,_6a68
https://hg.mozilla.org/mozilla-central/rev/3113a83b3455
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Flags: needinfo?(aswan)
Depends on: 1503893
Depends on: 1769250
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: