1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_workers_scriptloader_h__
7 #define mozilla_dom_workers_scriptloader_h__
19 BEGIN_WORKERS_NAMESPACE
21 namespace scriptloader
{
24 ChannelFromScriptURLMainThread(nsIPrincipal
* aPrincipal
,
26 nsIDocument
* aParentDoc
,
27 const nsString
& aScriptURL
,
28 nsIChannel
** aChannel
);
31 ChannelFromScriptURLWorkerThread(JSContext
* aCx
,
32 WorkerPrivate
* aParent
,
33 const nsString
& aScriptURL
,
34 nsIChannel
** aChannel
);
36 void ReportLoadError(JSContext
* aCx
, const nsString
& aURL
,
37 nsresult aLoadResult
, bool aIsMainThread
);
39 bool LoadWorkerScript(JSContext
* aCx
);
41 bool Load(JSContext
* aCx
, unsigned aURLCount
, jsval
* aURLs
);
43 } // namespace scriptloader
47 #endif /* mozilla_dom_workers_scriptloader_h__ */