js/xpconnect/loader/mozJSLoaderUtils.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:5f4590ac1989
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/. */
6
7 #ifndef mozJSLoaderUtils_h
8 #define mozJSLoaderUtils_h
9
10 #include "nsString.h"
11
12 class nsIURI;
13 namespace mozilla {
14 namespace scache {
15 class StartupCache;
16 }
17 }
18
19 nsresult
20 ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri,
21 JSContext *cx, nsIPrincipal *systemPrincipal,
22 JS::MutableHandleScript scriptp);
23
24 nsresult
25 ReadCachedFunction(mozilla::scache::StartupCache* cache, nsACString &uri,
26 JSContext *cx, nsIPrincipal *systemPrincipal,
27 JSFunction **function);
28
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);
37
38 #endif /* mozJSLoaderUtils_h */

mercurial