michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* vim: set ts=8 sts=4 et sw=4 tw=99: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozJSLoaderUtils_h michael@0: #define mozJSLoaderUtils_h michael@0: michael@0: #include "nsString.h" michael@0: michael@0: class nsIURI; michael@0: namespace mozilla { michael@0: namespace scache { michael@0: class StartupCache; michael@0: } michael@0: } michael@0: michael@0: nsresult michael@0: ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri, michael@0: JSContext *cx, nsIPrincipal *systemPrincipal, michael@0: JS::MutableHandleScript scriptp); michael@0: michael@0: nsresult michael@0: ReadCachedFunction(mozilla::scache::StartupCache* cache, nsACString &uri, michael@0: JSContext *cx, nsIPrincipal *systemPrincipal, michael@0: JSFunction **function); michael@0: michael@0: nsresult michael@0: WriteCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri, michael@0: JSContext *cx, nsIPrincipal *systemPrincipal, michael@0: JS::HandleScript script); michael@0: nsresult michael@0: WriteCachedFunction(mozilla::scache::StartupCache* cache, nsACString &uri, michael@0: JSContext *cx, nsIPrincipal *systemPrincipal, michael@0: JSFunction *function); michael@0: michael@0: #endif /* mozJSLoaderUtils_h */