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.
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, # You can obtain one at http://mozilla.org/MPL/2.0/.
5 from __future__ import unicode_literals
7 import os
8 import sys
10 from mach.decorators import (
11 CommandArgument,
12 CommandProvider,
13 Command,
14 )
16 from mozbuild.base import MachCommandBase
19 @CommandProvider
20 class WebIDLProvider(MachCommandBase):
21 @Command('webidl-example', category='misc',
22 description='Generate example files for a WebIDL interface.')
23 @CommandArgument('interface', nargs='+',
24 help='Interface(s) whose examples to generate.')
25 def webidl_example(self, interface):
26 from mozwebidlcodegen import BuildSystemWebIDL
28 manager = self._spawn(BuildSystemWebIDL).manager
29 for i in interface:
30 manager.generate_example_files(i)
32 @Command('webidl-parser-test', category='testing',
33 description='Run WebIDL tests.')
34 @CommandArgument('--verbose', '-v', action='store_true',
35 help='Run tests in verbose mode.')
36 def webidl_test(self, verbose=False):
37 sys.path.insert(0, os.path.join(self.topsrcdir, 'other-licenses',
38 'ply'))
40 from runtests import run_tests
41 return run_tests(None, verbose=verbose)