Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim: set ts=8 sts=4 et sw=4 tw=99: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsCOMPtr.h"
8 #include "mozIJSSubScriptLoader.h"
10 class nsIPrincipal;
11 class nsIURI;
12 class LoadSubScriptOptions;
14 #define MOZ_JSSUBSCRIPTLOADER_CID \
15 { /* 829814d6-1dd2-11b2-8e08-82fa0a339b00 */ \
16 0x929814d6, \
17 0x1dd2, \
18 0x11b2, \
19 {0x8e, 0x08, 0x82, 0xfa, 0x0a, 0x33, 0x9b, 0x00} \
20 }
22 class nsIIOService;
24 class mozJSSubScriptLoader : public mozIJSSubScriptLoader
25 {
26 public:
27 mozJSSubScriptLoader();
28 virtual ~mozJSSubScriptLoader();
30 // all the interface method declarations...
31 NS_DECL_ISUPPORTS
32 NS_DECL_MOZIJSSUBSCRIPTLOADER
34 private:
35 nsresult ReadScript(nsIURI *uri, JSContext *cx, JSObject *target_obj,
36 const nsAString &charset, const char *uriStr,
37 nsIIOService *serv, nsIPrincipal *principal,
38 bool reuseGlobal, JS::MutableHandleScript script,
39 JS::MutableHandleFunction function);
41 nsresult DoLoadSubScriptWithOptions(const nsAString &url,
42 LoadSubScriptOptions &options,
43 JSContext *cx,
44 JS::MutableHandle<JS::Value> retval);
46 nsCOMPtr<nsIPrincipal> mSystemPrincipal;
47 };