Bug 912411 (part 1) - Removed some jsapi.h includes in Gecko. r=bz.

--HG--
extra : rebase_source : c0b73945bcd6978a616fd846e33e69fae9162d78
This commit is contained in:
Nicholas Nethercote 2013-09-05 16:08:06 -07:00
parent c96ef00b1c
commit 6ed33677cf
6 changed files with 26 additions and 18 deletions

View File

@ -17,7 +17,6 @@
#include "nsIContent.h"
#include "nsIStreamListener.h"
#include "nsWeakReference.h"
#include "jsapi.h"
#include "nsIChannelEventSink.h"
#include "nsIAsyncVerifyRedirectCallback.h"
#include "nsIInterfaceRequestor.h"

View File

@ -12,7 +12,7 @@
#include "nsString.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"
#include "jsapi.h" // nsXBLJSClass derives from JSClass
#include "js/Class.h" // nsXBLJSClass derives from JSClass
#include "nsTArray.h"
class nsXBLBinding;

View File

@ -224,7 +224,7 @@ class Descriptor(DescriptorProvider):
# Do something sane for JSObject
if self.nativeType == "JSObject":
headerDefault = "jsapi.h"
headerDefault = "js/TypeDecls.h"
elif self.interface.isCallback() or self.interface.isJSImplemented():
# A copy of CGHeaders.getDeclarationFilename; we can't
# import it here, sadly.

View File

@ -29,6 +29,7 @@
#define JSD_USE_NSPR_LOCKS 1
#endif /* MOZILLA_CLIENT */
#include "jsapi.h"
#include "jshash.h"
#include "jsclist.h"
#include "jsdebug.h"

View File

@ -11,7 +11,8 @@
#ifndef jsdebug_h___
#define jsdebug_h___
#include "jsapi.h"
#include "jstypes.h"
#include "js/TypeDecls.h"
extern "C" {
@ -714,9 +715,9 @@ JSD_AddFullSourceText(JSDContext* jsdc,
typedef unsigned
(* JSD_ExecutionHookProc)(JSDContext* jsdc,
JSDThreadState* jsdthreadstate,
unsigned type,
unsigned type,
void* callerdata,
jsval* rval);
JS::Value* rval);
/* possible 'type' params for JSD_CallHookProc */
#define JSD_HOOK_TOPLEVEL_START 0 /* about to evaluate top level script */
@ -1005,14 +1006,14 @@ JSD_AttemptScriptInStackFrame(JSDContext* jsdc,
const char *filename, unsigned lineno, JS::MutableHandleValue rval);
/*
* Convert the given jsval to a string
* Convert the given JS::Value to a string
* NOTE: The ErrorReporter hook might be called if this fails.
*/
extern JSD_PUBLIC_API(JSString*)
JSD_ValToStringInStackFrame(JSDContext* jsdc,
JSDThreadState* jsdthreadstate,
JSDStackFrameInfo* jsdframe,
jsval val);
JS::Value val);
/*
* Get the JSDValue currently being thrown as an exception (may be NULL).
@ -1121,18 +1122,18 @@ JSD_CurrentThread();
/*
* NOTE: JSDValue and JSDProperty objects are reference counted. This allows
* for rooting these objects AND any underlying garbage collected jsvals.
* for rooting these objects AND any underlying garbage collected JS::Values.
* ALL JSDValue and JSDProperty objects returned by the functions below
* MUST eventually be released using the appropriate JSD_Dropxxx function.
*/
/*
* Create a new JSDValue to wrap the given jsval
* Create a new JSDValue to wrap the given JS::Value
* NOTE: must eventually release by calling JSD_DropValue (if not NULL)
* *** new for version 1.1 ****
*/
extern JSD_PUBLIC_API(JSDValue*)
JSD_NewValue(JSDContext* jsdc, jsval val);
JSD_NewValue(JSDContext* jsdc, JS::Value val);
/*
* Release the JSDValue. After this call the object MUST not be referenced again!
@ -1142,10 +1143,10 @@ extern JSD_PUBLIC_API(void)
JSD_DropValue(JSDContext* jsdc, JSDValue* jsdval);
/*
* Get the jsval wrapped by this JSDValue
* Get the JS::Value wrapped by this JSDValue
* *** new for version 1.1 ****
*/
extern JSD_PUBLIC_API(jsval)
extern JSD_PUBLIC_API(JS::Value)
JSD_GetValueWrappedJSVal(JSDContext* jsdc, JSDValue* jsdval);
/*

View File

@ -8,8 +8,15 @@
#ifndef __FilteringWrapper_h__
#define __FilteringWrapper_h__
#include <jsapi.h>
#include <jswrapper.h>
#include "mozilla/Attributes.h"
#include "jswrapper.h"
#include "js/CallNonGenericMethod.h"
struct JSPropertyDescriptor;
namespace JS {
class AutoIdVector;
}
namespace xpc {
@ -28,11 +35,11 @@ class FilteringWrapper : public Base {
JS::MutableHandle<JSPropertyDescriptor> desc,
unsigned flags) MOZ_OVERRIDE;
virtual bool getOwnPropertyNames(JSContext *cx, JS::Handle<JSObject*> wrapper,
js::AutoIdVector &props) MOZ_OVERRIDE;
JS::AutoIdVector &props) MOZ_OVERRIDE;
virtual bool enumerate(JSContext *cx, JS::Handle<JSObject*> wrapper,
js::AutoIdVector &props) MOZ_OVERRIDE;
JS::AutoIdVector &props) MOZ_OVERRIDE;
virtual bool keys(JSContext *cx, JS::Handle<JSObject*> wrapper,
js::AutoIdVector &props) MOZ_OVERRIDE;
JS::AutoIdVector &props) MOZ_OVERRIDE;
virtual bool iterate(JSContext *cx, JS::Handle<JSObject*> wrapper, unsigned flags,
JS::MutableHandle<JS::Value> vp) MOZ_OVERRIDE;
virtual bool nativeCall(JSContext *cx, JS::IsAcceptableThis test, JS::NativeImpl impl,