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 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 var xalan_field;
8 function onLoad()
9 {
10 view.tree = document.getElementById('out');
11 view.boxObject = view.tree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject);
12 {
13 view.mIframe = document.getElementById('hiddenHtml');
14 view.mIframe.webNavigation.allowPlugins = false;
15 view.mIframe.webNavigation.allowJavascript = false;
16 view.mIframe.webNavigation.allowMetaRedirects = false;
17 view.mIframe.webNavigation.allowImages = false;
18 }
19 view.database = view.tree.database;
20 view.builder = view.tree.builder.QueryInterface(nsIXULTemplateBuilder);
21 view.builder.QueryInterface(nsIXULTreeBuilder);
22 runItem.prototype.kDatabase = view.database;
23 xalan_field = document.getElementById("xalan_rdf");
24 var persistedUrl = xalan_field.getAttribute('url');
25 if (persistedUrl) {
26 view.xalan_url = persistedUrl;
27 xalan_field.value = persistedUrl;
28 }
29 view.setDataSource();
30 return true;
31 }
33 function onUnload()
34 {
35 if (xalan_field)
36 xalan_field.setAttribute('url', xalan_field.value);
37 }