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 namespace mozilla { 13 namespace scache { 14 class StartupCache; 15 } // namespace scache 16 } // namespace mozilla 17 18 nsresult 19 ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri, 20 JSContext* cx, nsIPrincipal* systemPrincipal, test_get_day_of_year_numeric(date_tuple, expected)21 JS::MutableHandleScript scriptp); 22 23 nsresult 24 ReadCachedFunction(mozilla::scache::StartupCache* cache, nsACString& uri, test_get_day_of_year_dt()25 JSContext* cx, nsIPrincipal* systemPrincipal, 26 JSFunction** function); 27 28 nsresult 29 WriteCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri, 30 JSContext* cx, nsIPrincipal* systemPrincipal, 31 JS::HandleScript script); 32 nsresult 33 WriteCachedFunction(mozilla::scache::StartupCache* cache, nsACString& uri, 34 JSContext* cx, nsIPrincipal* systemPrincipal, 35 JSFunction* function); 36 37 #endif /* mozJSLoaderUtils_h */ 38