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 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim:set ts=2 sw=2 sts=2 et cindent: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | /** |
michael@0 | 8 | * A common base class for representing WebIDL callback interface types in C++. |
michael@0 | 9 | * |
michael@0 | 10 | * This class implements common functionality like lifetime management, |
michael@0 | 11 | * initialization with the callback object, and setup of the call environment. |
michael@0 | 12 | * Subclasses corresponding to particular callback interface types should |
michael@0 | 13 | * provide methods that actually do the various necessary calls. |
michael@0 | 14 | */ |
michael@0 | 15 | |
michael@0 | 16 | #ifndef mozilla_dom_CallbackInterface_h |
michael@0 | 17 | #define mozilla_dom_CallbackInterface_h |
michael@0 | 18 | |
michael@0 | 19 | #include "mozilla/dom/CallbackObject.h" |
michael@0 | 20 | |
michael@0 | 21 | namespace mozilla { |
michael@0 | 22 | namespace dom { |
michael@0 | 23 | |
michael@0 | 24 | class CallbackInterface : public CallbackObject |
michael@0 | 25 | { |
michael@0 | 26 | public: |
michael@0 | 27 | explicit CallbackInterface(JS::Handle<JSObject*> aCallback, |
michael@0 | 28 | nsIGlobalObject *aIncumbentGlobal) |
michael@0 | 29 | : CallbackObject(aCallback, aIncumbentGlobal) |
michael@0 | 30 | { |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | protected: |
michael@0 | 34 | bool GetCallableProperty(JSContext* cx, const char* aPropName, |
michael@0 | 35 | JS::MutableHandle<JS::Value> aCallable); |
michael@0 | 36 | |
michael@0 | 37 | }; |
michael@0 | 38 | |
michael@0 | 39 | } // namespace dom |
michael@0 | 40 | } // namespace mozilla |
michael@0 | 41 | |
michael@0 | 42 | #endif // mozilla_dom_CallbackFunction_h |