js/xpconnect/loader/mozJSLoaderUtils.h
author Ed Morley <emorley@mozilla.com>
Tue, 30 Oct 2012 17:02:31 +0000
changeset 120431 ad1d720d82b7f84d3c7e50f4b02b7c3201662ddb
parent 120418 1545e91c658ec9cd25d9750a43bbe7afd8057cf9
child 120435 67cb43bb8865ecbcb79c2ea04a0494fd223cc69d
permissions -rw-r--r--
Backout a145ded68994, e0cf397089ec & 1545e91c658e (bug 798491) for bustage on a CLOSED TREE

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozJSLoaderUtils_h
#define mozJSLoaderUtils_h

#include "nsString.h"
#include "jsapi.h"

class nsIURI;
namespace mozilla {
namespace scache {
class StartupCache;
}
}

nsresult
ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri,
                 JSContext *cx, nsIPrincipal *systemPrincipal,
                 JSScript **script);

nsresult
WriteCachedScript(mozilla::scache::StartupCache* cache, nsACString &uri,
                  JSContext *cx, nsIPrincipal *systemPrincipal,
                  JSScript *script);

#endif /* mozJSLoaderUtils_h */