Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | Mozilla Public License Version 2.0 |
michael@0 | 2 | ================================== |
michael@0 | 3 | |
michael@0 | 4 | 1. Definitions |
michael@0 | 5 | -------------- |
michael@0 | 6 | |
michael@0 | 7 | 1.1. "Contributor" |
michael@0 | 8 | means each individual or legal entity that creates, contributes to |
michael@0 | 9 | the creation of, or owns Covered Software. |
michael@0 | 10 | |
michael@0 | 11 | 1.2. "Contributor Version" |
michael@0 | 12 | means the combination of the Contributions of others (if any) used |
michael@0 | 13 | by a Contributor and that particular Contributor's Contribution. |
michael@0 | 14 | |
michael@0 | 15 | 1.3. "Contribution" |
michael@0 | 16 | means Covered Software of a particular Contributor. |
michael@0 | 17 | |
michael@0 | 18 | 1.4. "Covered Software" |
michael@0 | 19 | means Source Code Form to which the initial Contributor has attached |
michael@0 | 20 | the notice in Exhibit A, the Executable Form of such Source Code |
michael@0 | 21 | Form, and Modifications of such Source Code Form, in each case |
michael@0 | 22 | including portions thereof. |
michael@0 | 23 | |
michael@0 | 24 | 1.5. "Incompatible With Secondary Licenses" |
michael@0 | 25 | means |
michael@0 | 26 | |
michael@0 | 27 | (a) that the initial Contributor has attached the notice described |
michael@0 | 28 | in Exhibit B to the Covered Software; or |
michael@0 | 29 | |
michael@0 | 30 | (b) that the Covered Software was made available under the terms of |
michael@0 | 31 | version 1.1 or earlier of the License, but not also under the |
michael@0 | 32 | terms of a Secondary License. |
michael@0 | 33 | |
michael@0 | 34 | 1.6. "Executable Form" |
michael@0 | 35 | means any form of the work other than Source Code Form. |
michael@0 | 36 | |
michael@0 | 37 | 1.7. "Larger Work" |
michael@0 | 38 | means a work that combines Covered Software with other material, in |
michael@0 | 39 | a separate file or files, that is not Covered Software. |
michael@0 | 40 | |
michael@0 | 41 | 1.8. "License" |
michael@0 | 42 | means this document. |
michael@0 | 43 | |
michael@0 | 44 | 1.9. "Licensable" |
michael@0 | 45 | means having the right to grant, to the maximum extent possible, |
michael@0 | 46 | whether at the time of the initial grant or subsequently, any and |
michael@0 | 47 | all of the rights conveyed by this License. |
michael@0 | 48 | |
michael@0 | 49 | 1.10. "Modifications" |
michael@0 | 50 | means any of the following: |
michael@0 | 51 | |
michael@0 | 52 | (a) any file in Source Code Form that results from an addition to, |
michael@0 | 53 | deletion from, or modification of the contents of Covered |
michael@0 | 54 | Software; or |
michael@0 | 55 | |
michael@0 | 56 | (b) any new file in Source Code Form that contains any Covered |
michael@0 | 57 | Software. |
michael@0 | 58 | |
michael@0 | 59 | 1.11. "Patent Claims" of a Contributor |
michael@0 | 60 | means any patent claim(s), including without limitation, method, |
michael@0 | 61 | process, and apparatus claims, in any patent Licensable by such |
michael@0 | 62 | Contributor that would be infringed, but for the grant of the |
michael@0 | 63 | License, by the making, using, selling, offering for sale, having |
michael@0 | 64 | made, import, or transfer of either its Contributions or its |
michael@0 | 65 | Contributor Version. |
michael@0 | 66 | |
michael@0 | 67 | 1.12. "Secondary License" |
michael@0 | 68 | means either the GNU General Public License, Version 2.0, the GNU |
michael@0 | 69 | Lesser General Public License, Version 2.1, the GNU Affero General |
michael@0 | 70 | Public License, Version 3.0, or any later versions of those |
michael@0 | 71 | licenses. |
michael@0 | 72 | |
michael@0 | 73 | 1.13. "Source Code Form" |
michael@0 | 74 | means the form of the work preferred for making modifications. |
michael@0 | 75 | |
michael@0 | 76 | 1.14. "You" (or "Your") |
michael@0 | 77 | means an individual or a legal entity exercising rights under this |
michael@0 | 78 | License. For legal entities, "You" includes any entity that |
michael@0 | 79 | controls, is controlled by, or is under common control with You. For |
michael@0 | 80 | purposes of this definition, "control" means (a) the power, direct |
michael@0 | 81 | or indirect, to cause the direction or management of such entity, |
michael@0 | 82 | whether by contract or otherwise, or (b) ownership of more than |
michael@0 | 83 | fifty percent (50%) of the outstanding shares or beneficial |
michael@0 | 84 | ownership of such entity. |
michael@0 | 85 | |
michael@0 | 86 | 2. License Grants and Conditions |
michael@0 | 87 | -------------------------------- |
michael@0 | 88 | |
michael@0 | 89 | 2.1. Grants |
michael@0 | 90 | |
michael@0 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, |
michael@0 | 92 | non-exclusive license: |
michael@0 | 93 | |
michael@0 | 94 | (a) under intellectual property rights (other than patent or trademark) |
michael@0 | 95 | Licensable by such Contributor to use, reproduce, make available, |
michael@0 | 96 | modify, display, perform, distribute, and otherwise exploit its |
michael@0 | 97 | Contributions, either on an unmodified basis, with Modifications, or |
michael@0 | 98 | as part of a Larger Work; and |
michael@0 | 99 | |
michael@0 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer |
michael@0 | 101 | for sale, have made, import, and otherwise transfer either its |
michael@0 | 102 | Contributions or its Contributor Version. |
michael@0 | 103 | |
michael@0 | 104 | 2.2. Effective Date |
michael@0 | 105 | |
michael@0 | 106 | The licenses granted in Section 2.1 with respect to any Contribution |
michael@0 | 107 | become effective for each Contribution on the date the Contributor first |
michael@0 | 108 | distributes such Contribution. |
michael@0 | 109 | |
michael@0 | 110 | 2.3. Limitations on Grant Scope |
michael@0 | 111 | |
michael@0 | 112 | The licenses granted in this Section 2 are the only rights granted under |
michael@0 | 113 | this License. No additional rights or licenses will be implied from the |
michael@0 | 114 | distribution or licensing of Covered Software under this License. |
michael@0 | 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a |
michael@0 | 116 | Contributor: |
michael@0 | 117 | |
michael@0 | 118 | (a) for any code that a Contributor has removed from Covered Software; |
michael@0 | 119 | or |
michael@0 | 120 | |
michael@0 | 121 | (b) for infringements caused by: (i) Your and any other third party's |
michael@0 | 122 | modifications of Covered Software, or (ii) the combination of its |
michael@0 | 123 | Contributions with other software (except as part of its Contributor |
michael@0 | 124 | Version); or |
michael@0 | 125 | |
michael@0 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of |
michael@0 | 127 | its Contributions. |
michael@0 | 128 | |
michael@0 | 129 | This License does not grant any rights in the trademarks, service marks, |
michael@0 | 130 | or logos of any Contributor (except as may be necessary to comply with |
michael@0 | 131 | the notice requirements in Section 3.4). |
michael@0 | 132 | |
michael@0 | 133 | 2.4. Subsequent Licenses |
michael@0 | 134 | |
michael@0 | 135 | No Contributor makes additional grants as a result of Your choice to |
michael@0 | 136 | distribute the Covered Software under a subsequent version of this |
michael@0 | 137 | License (see Section 10.2) or under the terms of a Secondary License (if |
michael@0 | 138 | permitted under the terms of Section 3.3). |
michael@0 | 139 | |
michael@0 | 140 | 2.5. Representation |
michael@0 | 141 | |
michael@0 | 142 | Each Contributor represents that the Contributor believes its |
michael@0 | 143 | Contributions are its original creation(s) or it has sufficient rights |
michael@0 | 144 | to grant the rights to its Contributions conveyed by this License. |
michael@0 | 145 | |
michael@0 | 146 | 2.6. Fair Use |
michael@0 | 147 | |
michael@0 | 148 | This License is not intended to limit any rights You have under |
michael@0 | 149 | applicable copyright doctrines of fair use, fair dealing, or other |
michael@0 | 150 | equivalents. |
michael@0 | 151 | |
michael@0 | 152 | 2.7. Conditions |
michael@0 | 153 | |
michael@0 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted |
michael@0 | 155 | in Section 2.1. |
michael@0 | 156 | |
michael@0 | 157 | 3. Responsibilities |
michael@0 | 158 | ------------------- |
michael@0 | 159 | |
michael@0 | 160 | 3.1. Distribution of Source Form |
michael@0 | 161 | |
michael@0 | 162 | All distribution of Covered Software in Source Code Form, including any |
michael@0 | 163 | Modifications that You create or to which You contribute, must be under |
michael@0 | 164 | the terms of this License. You must inform recipients that the Source |
michael@0 | 165 | Code Form of the Covered Software is governed by the terms of this |
michael@0 | 166 | License, and how they can obtain a copy of this License. You may not |
michael@0 | 167 | attempt to alter or restrict the recipients' rights in the Source Code |
michael@0 | 168 | Form. |
michael@0 | 169 | |
michael@0 | 170 | 3.2. Distribution of Executable Form |
michael@0 | 171 | |
michael@0 | 172 | If You distribute Covered Software in Executable Form then: |
michael@0 | 173 | |
michael@0 | 174 | (a) such Covered Software must also be made available in Source Code |
michael@0 | 175 | Form, as described in Section 3.1, and You must inform recipients of |
michael@0 | 176 | the Executable Form how they can obtain a copy of such Source Code |
michael@0 | 177 | Form by reasonable means in a timely manner, at a charge no more |
michael@0 | 178 | than the cost of distribution to the recipient; and |
michael@0 | 179 | |
michael@0 | 180 | (b) You may distribute such Executable Form under the terms of this |
michael@0 | 181 | License, or sublicense it under different terms, provided that the |
michael@0 | 182 | license for the Executable Form does not attempt to limit or alter |
michael@0 | 183 | the recipients' rights in the Source Code Form under this License. |
michael@0 | 184 | |
michael@0 | 185 | 3.3. Distribution of a Larger Work |
michael@0 | 186 | |
michael@0 | 187 | You may create and distribute a Larger Work under terms of Your choice, |
michael@0 | 188 | provided that You also comply with the requirements of this License for |
michael@0 | 189 | the Covered Software. If the Larger Work is a combination of Covered |
michael@0 | 190 | Software with a work governed by one or more Secondary Licenses, and the |
michael@0 | 191 | Covered Software is not Incompatible With Secondary Licenses, this |
michael@0 | 192 | License permits You to additionally distribute such Covered Software |
michael@0 | 193 | under the terms of such Secondary License(s), so that the recipient of |
michael@0 | 194 | the Larger Work may, at their option, further distribute the Covered |
michael@0 | 195 | Software under the terms of either this License or such Secondary |
michael@0 | 196 | License(s). |
michael@0 | 197 | |
michael@0 | 198 | 3.4. Notices |
michael@0 | 199 | |
michael@0 | 200 | You may not remove or alter the substance of any license notices |
michael@0 | 201 | (including copyright notices, patent notices, disclaimers of warranty, |
michael@0 | 202 | or limitations of liability) contained within the Source Code Form of |
michael@0 | 203 | the Covered Software, except that You may alter any license notices to |
michael@0 | 204 | the extent required to remedy known factual inaccuracies. |
michael@0 | 205 | |
michael@0 | 206 | 3.5. Application of Additional Terms |
michael@0 | 207 | |
michael@0 | 208 | You may choose to offer, and to charge a fee for, warranty, support, |
michael@0 | 209 | indemnity or liability obligations to one or more recipients of Covered |
michael@0 | 210 | Software. However, You may do so only on Your own behalf, and not on |
michael@0 | 211 | behalf of any Contributor. You must make it absolutely clear that any |
michael@0 | 212 | such warranty, support, indemnity, or liability obligation is offered by |
michael@0 | 213 | You alone, and You hereby agree to indemnify every Contributor for any |
michael@0 | 214 | liability incurred by such Contributor as a result of warranty, support, |
michael@0 | 215 | indemnity or liability terms You offer. You may include additional |
michael@0 | 216 | disclaimers of warranty and limitations of liability specific to any |
michael@0 | 217 | jurisdiction. |
michael@0 | 218 | |
michael@0 | 219 | 4. Inability to Comply Due to Statute or Regulation |
michael@0 | 220 | --------------------------------------------------- |
michael@0 | 221 | |
michael@0 | 222 | If it is impossible for You to comply with any of the terms of this |
michael@0 | 223 | License with respect to some or all of the Covered Software due to |
michael@0 | 224 | statute, judicial order, or regulation then You must: (a) comply with |
michael@0 | 225 | the terms of this License to the maximum extent possible; and (b) |
michael@0 | 226 | describe the limitations and the code they affect. Such description must |
michael@0 | 227 | be placed in a text file included with all distributions of the Covered |
michael@0 | 228 | Software under this License. Except to the extent prohibited by statute |
michael@0 | 229 | or regulation, such description must be sufficiently detailed for a |
michael@0 | 230 | recipient of ordinary skill to be able to understand it. |
michael@0 | 231 | |
michael@0 | 232 | 5. Termination |
michael@0 | 233 | -------------- |
michael@0 | 234 | |
michael@0 | 235 | 5.1. The rights granted under this License will terminate automatically |
michael@0 | 236 | if You fail to comply with any of its terms. However, if You become |
michael@0 | 237 | compliant, then the rights granted under this License from a particular |
michael@0 | 238 | Contributor are reinstated (a) provisionally, unless and until such |
michael@0 | 239 | Contributor explicitly and finally terminates Your grants, and (b) on an |
michael@0 | 240 | ongoing basis, if such Contributor fails to notify You of the |
michael@0 | 241 | non-compliance by some reasonable means prior to 60 days after You have |
michael@0 | 242 | come back into compliance. Moreover, Your grants from a particular |
michael@0 | 243 | Contributor are reinstated on an ongoing basis if such Contributor |
michael@0 | 244 | notifies You of the non-compliance by some reasonable means, this is the |
michael@0 | 245 | first time You have received notice of non-compliance with this License |
michael@0 | 246 | from such Contributor, and You become compliant prior to 30 days after |
michael@0 | 247 | Your receipt of the notice. |
michael@0 | 248 | |
michael@0 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent |
michael@0 | 250 | infringement claim (excluding declaratory judgment actions, |
michael@0 | 251 | counter-claims, and cross-claims) alleging that a Contributor Version |
michael@0 | 252 | directly or indirectly infringes any patent, then the rights granted to |
michael@0 | 253 | You by any and all Contributors for the Covered Software under Section |
michael@0 | 254 | 2.1 of this License shall terminate. |
michael@0 | 255 | |
michael@0 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all |
michael@0 | 257 | end user license agreements (excluding distributors and resellers) which |
michael@0 | 258 | have been validly granted by You or Your distributors under this License |
michael@0 | 259 | prior to termination shall survive termination. |
michael@0 | 260 | |
michael@0 | 261 | ************************************************************************ |
michael@0 | 262 | * * |
michael@0 | 263 | * 6. Disclaimer of Warranty * |
michael@0 | 264 | * ------------------------- * |
michael@0 | 265 | * * |
michael@0 | 266 | * Covered Software is provided under this License on an "as is" * |
michael@0 | 267 | * basis, without warranty of any kind, either expressed, implied, or * |
michael@0 | 268 | * statutory, including, without limitation, warranties that the * |
michael@0 | 269 | * Covered Software is free of defects, merchantable, fit for a * |
michael@0 | 270 | * particular purpose or non-infringing. The entire risk as to the * |
michael@0 | 271 | * quality and performance of the Covered Software is with You. * |
michael@0 | 272 | * Should any Covered Software prove defective in any respect, You * |
michael@0 | 273 | * (not any Contributor) assume the cost of any necessary servicing, * |
michael@0 | 274 | * repair, or correction. This disclaimer of warranty constitutes an * |
michael@0 | 275 | * essential part of this License. No use of any Covered Software is * |
michael@0 | 276 | * authorized under this License except under this disclaimer. * |
michael@0 | 277 | * * |
michael@0 | 278 | ************************************************************************ |
michael@0 | 279 | |
michael@0 | 280 | ************************************************************************ |
michael@0 | 281 | * * |
michael@0 | 282 | * 7. Limitation of Liability * |
michael@0 | 283 | * -------------------------- * |
michael@0 | 284 | * * |
michael@0 | 285 | * Under no circumstances and under no legal theory, whether tort * |
michael@0 | 286 | * (including negligence), contract, or otherwise, shall any * |
michael@0 | 287 | * Contributor, or anyone who distributes Covered Software as * |
michael@0 | 288 | * permitted above, be liable to You for any direct, indirect, * |
michael@0 | 289 | * special, incidental, or consequential damages of any character * |
michael@0 | 290 | * including, without limitation, damages for lost profits, loss of * |
michael@0 | 291 | * goodwill, work stoppage, computer failure or malfunction, or any * |
michael@0 | 292 | * and all other commercial damages or losses, even if such party * |
michael@0 | 293 | * shall have been informed of the possibility of such damages. This * |
michael@0 | 294 | * limitation of liability shall not apply to liability for death or * |
michael@0 | 295 | * personal injury resulting from such party's negligence to the * |
michael@0 | 296 | * extent applicable law prohibits such limitation. Some * |
michael@0 | 297 | * jurisdictions do not allow the exclusion or limitation of * |
michael@0 | 298 | * incidental or consequential damages, so this exclusion and * |
michael@0 | 299 | * limitation may not apply to You. * |
michael@0 | 300 | * * |
michael@0 | 301 | ************************************************************************ |
michael@0 | 302 | |
michael@0 | 303 | 8. Litigation |
michael@0 | 304 | ------------- |
michael@0 | 305 | |
michael@0 | 306 | Any litigation relating to this License may be brought only in the |
michael@0 | 307 | courts of a jurisdiction where the defendant maintains its principal |
michael@0 | 308 | place of business and such litigation shall be governed by laws of that |
michael@0 | 309 | jurisdiction, without reference to its conflict-of-law provisions. |
michael@0 | 310 | Nothing in this Section shall prevent a party's ability to bring |
michael@0 | 311 | cross-claims or counter-claims. |
michael@0 | 312 | |
michael@0 | 313 | 9. Miscellaneous |
michael@0 | 314 | ---------------- |
michael@0 | 315 | |
michael@0 | 316 | This License represents the complete agreement concerning the subject |
michael@0 | 317 | matter hereof. If any provision of this License is held to be |
michael@0 | 318 | unenforceable, such provision shall be reformed only to the extent |
michael@0 | 319 | necessary to make it enforceable. Any law or regulation which provides |
michael@0 | 320 | that the language of a contract shall be construed against the drafter |
michael@0 | 321 | shall not be used to construe this License against a Contributor. |
michael@0 | 322 | |
michael@0 | 323 | 10. Versions of the License |
michael@0 | 324 | --------------------------- |
michael@0 | 325 | |
michael@0 | 326 | 10.1. New Versions |
michael@0 | 327 | |
michael@0 | 328 | Mozilla Foundation is the license steward. Except as provided in Section |
michael@0 | 329 | 10.3, no one other than the license steward has the right to modify or |
michael@0 | 330 | publish new versions of this License. Each version will be given a |
michael@0 | 331 | distinguishing version number. |
michael@0 | 332 | |
michael@0 | 333 | 10.2. Effect of New Versions |
michael@0 | 334 | |
michael@0 | 335 | You may distribute the Covered Software under the terms of the version |
michael@0 | 336 | of the License under which You originally received the Covered Software, |
michael@0 | 337 | or under the terms of any subsequent version published by the license |
michael@0 | 338 | steward. |
michael@0 | 339 | |
michael@0 | 340 | 10.3. Modified Versions |
michael@0 | 341 | |
michael@0 | 342 | If you create software not governed by this License, and you want to |
michael@0 | 343 | create a new license for such software, you may create and use a |
michael@0 | 344 | modified version of this License if you rename the license and remove |
michael@0 | 345 | any references to the name of the license steward (except to note that |
michael@0 | 346 | such modified license differs from this License). |
michael@0 | 347 | |
michael@0 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary |
michael@0 | 349 | Licenses |
michael@0 | 350 | |
michael@0 | 351 | If You choose to distribute Source Code Form that is Incompatible With |
michael@0 | 352 | Secondary Licenses under the terms of this version of the License, the |
michael@0 | 353 | notice described in Exhibit B of this License must be attached. |
michael@0 | 354 | |
michael@0 | 355 | Exhibit A - Source Code Form License Notice |
michael@0 | 356 | ------------------------------------------- |
michael@0 | 357 | |
michael@0 | 358 | This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 359 | License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 361 | |
michael@0 | 362 | If it is not possible or desirable to put the notice in a particular |
michael@0 | 363 | file, then You may include the notice in a location (such as a LICENSE |
michael@0 | 364 | file in a relevant directory) where a recipient would be likely to look |
michael@0 | 365 | for such a notice. |
michael@0 | 366 | |
michael@0 | 367 | You may add additional accurate notices of copyright ownership. |
michael@0 | 368 | |
michael@0 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice |
michael@0 | 370 | --------------------------------------------------------- |
michael@0 | 371 | |
michael@0 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as |
michael@0 | 373 | defined by the Mozilla Public License, v. 2.0. |