Closed Bug 1448048 Opened 6 years ago Closed 6 years ago

Disable components shim on nightly

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Would be interesting to see whether we can just ditch it.  Usage is pretty low....
MozReview-Commit-ID: 6W1nEyKGlER
Attachment #8961625 - Flags: review?(continuation)
Priority: -- → P2
Comment on attachment 8961625 [details] [diff] [review]
Restrict the window.Components shim to non-nightly-only to see whether sites actually use it

Review of attachment 8961625 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/xpconnect/tests/mochitest/test_bug1448048.html
@@ +12,5 @@
> +
> +    /** Test for Bug 1448048 **/
> +    var {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
> +    if (AppConstants.NIGHTLY_BUILD) {
> +      is(typeof Components, "undefined", "Should be no Components shim on nightly");

micronit: "Nightly" instead of "nightly" for both assert messages?

::: testing/mochitest/tests/SimpleTest/SimpleTest.js
@@ +867,5 @@
>      // be forwarded to the child process.
> +    //
> +    // Even if the real |Components| doesn't exist, we might shim in a simple JS
> +    // placebo for compat. An easy way to differentiate this from the real thing
> +    // is whether the property is read-only or not.  The real components

micronit: you are inconsistent about "read-only" vs "readonly". Also, maybe "components" should be capitalized? (Also in EventUtils.js which has the same comment.)
Attachment #8961625 - Flags: review?(continuation) → review+
Nits fixed.  Thank you!
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/94a8e9c4c345
Restrict the window.Components shim to non-nightly-only to see whether sites actually use it.  r=mccr8
Backout by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/05d3bc0ebe47
Backed out changeset 94a8e9c4c345 for Robocop failures on Android on a CLOSED TREE
Backed out changeset 94a8e9c4c345 (bug 1448048) for Robocop failures on Android on a CLOSED TREE 

Backout link: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=05d3bc0ebe47942256894b4f777f8a136511b633

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=6adf86b8d1219becf3c7e4b4be4b461cc98a7230

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

Log snippet: 

[task 2018-03-23T17:25:19.716Z] 17:25:19     INFO -  TEST-PASS | testInputConnection | The Toolbar title is mochi.test:8888/tests/robocop/robocop_input.html - mochi.test:8888/tests/robocop/robocop_input.html should equal mochi.test:8888/tests/robocop/robocop_input.html
[task 2018-03-23T17:25:19.716Z] 17:25:19     INFO -  Buffered messages finished
[task 2018-03-23T17:25:19.717Z] 17:25:19  WARNING -  TEST-UNEXPECTED-FAIL | testInputConnection | GeckoEventExpecter - blockForEvent timeout: Robocop:Java
[task 2018-03-23T17:25:19.717Z] 17:25:19     INFO -  0 ERROR Exception caught during test! - junit.framework.AssertionFailedError: TEST-UNEXPECTED-FAIL | testInputConnection | GeckoEventExpecter - blockForEvent timeout: Robocop:Java
[task 2018-03-23T17:25:19.717Z] 17:25:19     INFO -  	at junit.framework.Assert.fail(Assert.java:50)
[task 2018-03-23T17:25:19.718Z] 17:25:19     INFO -  	at org.mozilla.gecko.FennecMochitestAssert._logMochitestResult(FennecMochitestAssert.java:124)
[task 2018-03-23T17:25:19.718Z] 17:25:19     INFO -  	at org.mozilla.gecko.FennecMochitestAssert.ok(FennecMochitestAssert.java:145)
[task 2018-03-23T17:25:19.718Z] 17:25:19     INFO -  	at org.mozilla.gecko.FennecNativeActions$GeckoEventExpecter.blockForEvent(FennecNativeActions.java:113)
[task 2018-03-23T17:25:19.718Z] 17:25:19     INFO -  	at org.mozilla.gecko.FennecNativeActions$GeckoEventExpecter.blockForEvent(FennecNativeActions.java:97)
[task 2018-03-23T17:25:19.719Z] 17:25:19     INFO -  	at org.mozilla.gecko.FennecNativeActions$GeckoEventExpecter.blockForBundle(FennecNativeActions.java:171)
[task 2018-03-23T17:25:19.719Z] 17:25:19     INFO -  	at org.mozilla.gecko.tests.helpers.JavascriptBridge.processPendingMessage(JavascriptBridge.java:186)
[task 2018-03-23T17:25:19.719Z] 17:25:19     INFO -  	at org.mozilla.gecko.tests.helpers.JavascriptBridge.ensureJavaBridgeLoaded(JavascriptBridge.java:222)
[task 2018-03-23T17:25:19.720Z] 17:25:19     INFO -  	at org.mozilla.gecko.tests.helpers.JavascriptBridge.sendMessage(JavascriptBridge.java:227)
[task 2018-03-23T17:25:19.720Z] 17:25:19     INFO -  	at org.mozilla.gecko.tests.helpers.JavascriptBridge.syncCall(JavascriptBridge.java:138)
[task 2018-03-23T17:25:19.720Z] 17:25:19     INFO -  	at org.mozilla.gecko.tests.testInputConnection.testInputConnection(testInputConnection.java:48)
[task 2018-03-23T17:25:19.721Z] 17:25:19     INFO -  	at java.lang.reflect.Method.invokeNative(Native Method)
[task 2018-03-23T17:25:19.721Z] 17:25:19     INFO -  	at java.lang.reflect.Method.invoke(Method.java:525)
[task 2018-03-23T17:25:19.721Z] 17:25:19     INFO -  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
[task 2018-03-23T17:25:19.722Z] 17:25:19     INFO -  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
[task 2018-03-23T17:25:19.722Z] 17:25:19     INFO -  	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
[task 2018-03-23T17:25:19.722Z] 17:25:19     INFO -  	at org.mozilla.gecko.tests.BaseRobocopTest.runTest(BaseRobocopTest.java:188)
[task 2018-03-23T17:25:19.722Z] 17:25:19     INFO -  	at junit.framework.TestCase.runBare(TestCase.java:134)
[task 2018-03-23T17:25:19.723Z] 17:25:19     INFO -  	at junit.framework.TestResult$1.protect(TestResult.java:115)
[task 2018-03-23T17:25:19.723Z] 17:25:19     INFO -  	at junit.framework.TestResult.runProtected(TestResult.java:133)
[task 2018-03-23T17:25:19.723Z] 17:25:19     INFO -  	at junit.framework.TestResult.run(TestResult.java:118)
[task 2018-03-23T17:25:19.723Z] 17:25:19     INFO -  	at junit.framework.TestCase.run(TestCase.java:124)
[task 2018-03-23T17:25:19.724Z] 17:25:19     INFO -  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
[task 2018-03-23T17:25:19.724Z] 17:25:19     INFO -  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
[task 2018-03-23T17:25:19.724Z] 17:25:19     INFO -  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
[task 2018-03-23T17:25:19.725Z] 17:25:19     INFO -  	at org.mozilla.gecko.FennecInstrumentationTestRunner.onStart(FennecInstrumentationTestRunner.java:64)
[task 2018-03-23T17:25:19.725Z] 17:25:19     INFO -  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
[task 2018-03-23T17:25:19.727Z] 17:25:19  WARNING -  TEST-UNEXPECTED-FAIL | testInputConnection | Exception caught - junit.framework.AssertionFailedError: TEST-UNEXPECTED-FAIL | testInputConnection | GeckoEventExpecter - blockForEvent timeout: Robocop:Java
[task 2018-03-23T17:25:19.727Z] 17:25:19     INFO -  GECKO | EventExpecter: no longer listening for Robocop:Java
[task 2018-03-23T17:25:19.727Z] 17:25:19     INFO -  TEST-OK | testInputConnection | took 243567ms
Flags: needinfo?(bzbarsky)
Mmm, platform-specific tests...  Looks like they copied the same broken logic into mobile/android/tests/browser/robocop/robocop_head.js and that just needs to be fixed.
Raul, thank you for backing that out, and sorry for the trouble!
Flags: needinfo?(bzbarsky)
In particular, that code in robocop_head.js is identical to the code in dom/indexedDB/test/helpers.js and needs the same fix.  Try runs going now.
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/32793a250654
Restrict the window.Components shim to non-nightly-only to see whether sites actually use it.  r=mccr8
https://hg.mozilla.org/mozilla-central/rev/32793a250654
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: