зеркало из https://github.com/mozilla/gecko-dev.git
Bug 698410 - Pass JSObject to nsIScriptContext::InitClasses; r=jmaher
This commit is contained in:
Родитель
0f27987dfd
Коммит
1b4e5e652c
|
@ -74,8 +74,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContextPrincipal,
|
|||
NS_ISCRIPTCONTEXTPRINCIPAL_IID)
|
||||
|
||||
#define NS_ISCRIPTCONTEXT_IID \
|
||||
{ 0x18b25592, 0xb1f3, 0x4e96, \
|
||||
{ 0xab, 0x50, 0x3d, 0x91, 0xf4, 0xc8, 0x1d, 0xa1 } }
|
||||
{ 0x39b3ea7c, 0xdc26, 0x4756, \
|
||||
{ 0xa0, 0x3c, 0x13, 0xa0, 0x42, 0x03, 0x07, 0x6a } }
|
||||
|
||||
/* This MUST match JSVERSION_DEFAULT. This version stuff if we don't
|
||||
know what language we have is a little silly... */
|
||||
|
@ -428,7 +428,7 @@ public:
|
|||
* call DidInitializeContext() when a context is fully
|
||||
* (successfully) initialized.
|
||||
*/
|
||||
virtual nsresult InitClasses(void *aGlobalObj) = 0;
|
||||
virtual nsresult InitClasses(JSObject* aGlobalObj) = 0;
|
||||
|
||||
/**
|
||||
* Clear the scope object - may be called either as we are being torn down,
|
||||
|
|
|
@ -2959,13 +2959,9 @@ static JSFunctionSpec EthogramFunctions[] = {
|
|||
#endif
|
||||
|
||||
nsresult
|
||||
nsJSContext::InitClasses(void *aGlobalObj)
|
||||
nsJSContext::InitClasses(JSObject* aGlobalObj)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
JSObject *globalObj = static_cast<JSObject *>(aGlobalObj);
|
||||
|
||||
rv = InitializeExternalClasses();
|
||||
nsresult rv = InitializeExternalClasses();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
JSAutoRequest ar(mContext);
|
||||
|
@ -2973,21 +2969,21 @@ nsJSContext::InitClasses(void *aGlobalObj)
|
|||
::JS_SetOptions(mContext, mDefaultJSOptions);
|
||||
|
||||
// Attempt to initialize profiling functions
|
||||
::JS_DefineProfilingFunctions(mContext, globalObj);
|
||||
::JS_DefineProfilingFunctions(mContext, aGlobalObj);
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
// Attempt to initialize TraceMalloc functions
|
||||
::JS_DefineFunctions(mContext, globalObj, TraceMallocFunctions);
|
||||
::JS_DefineFunctions(mContext, aGlobalObj, TraceMallocFunctions);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_JPROF
|
||||
// Attempt to initialize JProf functions
|
||||
::JS_DefineFunctions(mContext, globalObj, JProfFunctions);
|
||||
::JS_DefineFunctions(mContext, aGlobalObj, JProfFunctions);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_TRACEVIS
|
||||
// Attempt to initialize Ethogram functions
|
||||
::JS_DefineFunctions(mContext, globalObj, EthogramFunctions);
|
||||
::JS_DefineFunctions(mContext, aGlobalObj, EthogramFunctions);
|
||||
#endif
|
||||
|
||||
JSOptionChangedCallback(js_options_dot_str, this);
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
|
||||
virtual void SetGCOnDestruction(bool aGCOnDestruction);
|
||||
|
||||
virtual nsresult InitClasses(void *aGlobalObj);
|
||||
virtual nsresult InitClasses(JSObject* aGlobalObj);
|
||||
virtual void ClearScope(void* aGlobalObj, bool bClearPolluters);
|
||||
|
||||
virtual void WillInitializeContext();
|
||||
|
|
Загрузка…
Ссылка в новой задаче