Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 #ifndef mozJSLoaderUtils_h
8 #define mozJSLoaderUtils_h
10 #include "nsString.h"
12 class nsIURI;
13 namespace mozilla {
14 namespace scache {
15 class StartupCache;
16 }
17 }
19 nsresult
20 ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri,
21 JSContext *cx, nsIPrincipal *systemPrincipal,
22 JS::MutableHandleScript scriptp);
24 nsresult
25 ReadCachedFunction(mozilla::scache::StartupCache* cache, nsACString &uri,
26 JSContext *cx, nsIPrincipal *systemPrincipal,
27 JSFunction **function);
29 nsresult
30 WriteCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri,
31 JSContext *cx, nsIPrincipal *systemPrincipal,
32 JS::HandleScript script);
33 nsresult
34 WriteCachedFunction(mozilla::scache::StartupCache* cache, nsACString &uri,
35 JSContext *cx, nsIPrincipal *systemPrincipal,
36 JSFunction *function);
38 #endif /* mozJSLoaderUtils_h */