Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
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 file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_workers_xmlhttprequestupload_h__
7 #define mozilla_dom_workers_xmlhttprequestupload_h__
9 #include "nsXMLHttpRequest.h"
11 BEGIN_WORKERS_NAMESPACE
13 class XMLHttpRequest;
15 class XMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget
16 {
17 nsRefPtr<XMLHttpRequest> mXHR;
19 XMLHttpRequestUpload(XMLHttpRequest* aXHR);
21 ~XMLHttpRequestUpload();
23 public:
24 virtual JSObject*
25 WrapObject(JSContext* aCx) MOZ_OVERRIDE;
27 static already_AddRefed<XMLHttpRequestUpload>
28 Create(XMLHttpRequest* aXHR);
30 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XMLHttpRequestUpload, nsXHREventTarget)
32 NS_DECL_ISUPPORTS_INHERITED
34 nsISupports*
35 GetParentObject() const
36 {
37 // There's only one global on a worker, so we don't need to specify.
38 return nullptr;
39 }
41 bool
42 HasListeners()
43 {
44 return mListenerManager && mListenerManager->HasListeners();
45 }
46 };
48 END_WORKERS_NAMESPACE
50 #endif // mozilla_dom_workers_xmlhttprequestupload_h__