Closed Bug 1485151 Opened 6 years ago Closed 6 years ago

Investigate try-with-resources for temporary strict mode exceptions

Categories

(Firefox for Android Graveyard :: General, enhancement)

All
Android
enhancement
Not set
normal

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: JanH, Assigned: JanH)

References

Details

Attachments

(2 files, 1 obsolete file)

I've stumbled across this in the Chromium source and it seems a nicer way of setting and resetting temporary strict mode exceptions.
Depends on: 1485439
In my opinion this is an altogether nicer way of setting and resetting temporary
StrictMode exceptions. The only fly in the ointment is that this causes a
warning about a technically unused variable that subsequently needs suppressing.
Attachment #9006090 - Attachment is obsolete: true
Comment on attachment 9006085 [details]
Bug 1485151 - Part 1 - Import StrictModeContext from Chromium. r?jchen

Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9006085 - Flags: review+
Comment on attachment 9006086 [details]
Bug 1485151 - Part 2 - Switch our whitelisting of StrictMode violations to try-with-resources. r?jchen

Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9006086 - Flags: review+
I want to import some code from Chromium in https://phabricator.services.mozilla.com/D4888 and reference that file accordingly in the "Chromium License" part of our license.html. jchen said to run this by you as well.
Flags: needinfo?(mhoye)
Per: https://chromium.googlesource.com/chromium/src/+/master/LICENSE

... the Chromium license is a standard BSD license with an additional clause saying that: "Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."

This is certainly a restriction that we already face as an organization, and doesn't change the nature of the license as far as code re-use is concerned. This is an acceptable, MPL-compatible license, and we can re-use code licensed therein in the Mozilla codebase.

Thanks for checking.
Flags: needinfo?(mhoye)
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bae80c903001
Part 1 - Import StrictModeContext from Chromium. r=jchen,mhoye
https://hg.mozilla.org/integration/mozilla-inbound/rev/2e667a7854b6
Part 2 - Switch our whitelisting of StrictMode violations to try-with-resources. r=jchen
Backout by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2f7ed6350bf
Backed out 2 changesets on developer's request
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa6197b504ff
Part 1 - Import StrictModeContext from Chromium. r=jchen,mhoye
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f53dc79984c
Part 2 - Switch our whitelisting of StrictMode violations to try-with-resources. r=jchen
https://hg.mozilla.org/mozilla-central/rev/fa6197b504ff
https://hg.mozilla.org/mozilla-central/rev/9f53dc79984c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: