зеркало из https://github.com/mozilla/gecko-dev.git
bug 624880 - renaming JSD public API to reflect the signature change. r=timeless
This commit is contained in:
Родитель
8bc1af8b91
Коммит
bfe6be0aec
10
js/jsd/jsd.h
10
js/jsd/jsd.h
|
@ -461,7 +461,7 @@ extern const char*
|
|||
jsd_GetScriptFilename(JSDContext* jsdc, JSDScript *jsdscript);
|
||||
|
||||
extern JSString*
|
||||
jsd_GetScriptFunctionName(JSDContext* jsdc, JSDScript *jsdscript);
|
||||
jsd_GetScriptFunctionId(JSDContext* jsdc, JSDScript *jsdscript);
|
||||
|
||||
extern uintN
|
||||
jsd_GetScriptBaseLineNumber(JSDContext* jsdc, JSDScript *jsdscript);
|
||||
|
@ -725,9 +725,9 @@ jsd_GetThisForStackFrame(JSDContext* jsdc,
|
|||
JSDStackFrameInfo* jsdframe);
|
||||
|
||||
extern JSString*
|
||||
jsd_GetNameForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe);
|
||||
jsd_GetIdForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe);
|
||||
|
||||
extern JSDThreadState*
|
||||
jsd_NewThreadState(JSDContext* jsdc, JSContext *cx);
|
||||
|
@ -970,7 +970,7 @@ extern JSString*
|
|||
jsd_GetValueString(JSDContext* jsdc, JSDValue* jsdval);
|
||||
|
||||
extern JSString*
|
||||
jsd_GetValueFunctionName(JSDContext* jsdc, JSDValue* jsdval);
|
||||
jsd_GetValueFunctionId(JSDContext* jsdc, JSDValue* jsdval);
|
||||
|
||||
extern JSFunction*
|
||||
jsd_GetValueFunction(JSDContext* jsdc, JSDValue* jsdval);
|
||||
|
|
|
@ -72,7 +72,7 @@ EXPORTS
|
|||
_JSD_GetScriptBaseLineNumber
|
||||
_JSD_GetScriptFilename
|
||||
_JSD_GetScriptForStackFrame
|
||||
_JSD_GetScriptFunctionName
|
||||
_JSD_GetScriptFunctionId
|
||||
_JSD_GetScriptHook
|
||||
_JSD_GetScriptLineExtent
|
||||
_JSD_GetSourceAlterCount
|
||||
|
|
|
@ -154,7 +154,7 @@ _scriptHook( JSDContext* jsdc,
|
|||
if( creating )
|
||||
{
|
||||
char* url = (char*)JSD_GetScriptFilename (jsdc, jsdscript);
|
||||
char* function = (char*)JSD_GetScriptFunctionName (jsdc, jsdscript);
|
||||
JSString* function = JSD_GetScriptFunctionId (jsdc, jsdscript);
|
||||
int base = JSD_GetScriptBaseLineNumber (jsdc, jsdscript);
|
||||
int extent = JSD_GetScriptLineExtent (jsdc, jsdscript);
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ jsd_Constructing(JSDContext* jsdc, JSContext *cx, JSObject *obj,
|
|||
JSD_UNLOCK_SCRIPTS(jsdc);
|
||||
if( jsdscript )
|
||||
{
|
||||
ctorName = jsd_GetScriptFunctionName(jsdc, jsdscript);
|
||||
ctorName = jsd_GetScriptFunctionId(jsdc, jsdscript);
|
||||
if( ctorName )
|
||||
jsdobj->ctorName = jsd_AddAtom(jsdc, ctorName);
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ _dumpJSDScript(JSDContext* jsdc, JSDScript* jsdscript, const char* leadingtext)
|
|||
size_t n;
|
||||
|
||||
name = jsd_GetScriptFilename(jsdc, jsdscript);
|
||||
fun = jsd_GetScriptFunctionName(jsdc, jsdscript);
|
||||
fun = jsd_GetScriptFunctionId(jsdc, jsdscript);
|
||||
base = jsd_GetScriptBaseLineNumber(jsdc, jsdscript);
|
||||
extent = jsd_GetScriptLineExtent(jsdc, jsdscript);
|
||||
n = size_t(snprintf(Buf, sizeof(Buf), "%sscript=%08X, %s, ",
|
||||
|
@ -498,7 +498,7 @@ jsd_GetScriptFilename(JSDContext* jsdc, JSDScript *jsdscript)
|
|||
}
|
||||
|
||||
JSString*
|
||||
jsd_GetScriptFunctionName(JSDContext* jsdc, JSDScript *jsdscript)
|
||||
jsd_GetScriptFunctionId(JSDContext* jsdc, JSDScript *jsdscript)
|
||||
{
|
||||
JSString* str;
|
||||
|
||||
|
|
|
@ -358,9 +358,9 @@ jsd_GetThisForStackFrame(JSDContext* jsdc,
|
|||
}
|
||||
|
||||
JSString*
|
||||
jsd_GetNameForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe)
|
||||
jsd_GetIdForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe)
|
||||
{
|
||||
JSString *rv = NULL;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ _interpreterTrace(JSDContext* jsdc, JSContext *cx, JSStackFrame *fp,
|
|||
jsdscript = jsd_FindOrCreateJSDScript(jsdc, cx, script, fp);
|
||||
JSD_UNLOCK_SCRIPTS(jsdc);
|
||||
if(jsdscript)
|
||||
funName = JSD_GetScriptFunctionName(jsdc, jsdscript);
|
||||
funName = JSD_GetScriptFunctionId(jsdc, jsdscript);
|
||||
}
|
||||
|
||||
if(before)
|
||||
|
|
|
@ -245,7 +245,7 @@ jsd_GetValueString(JSDContext* jsdc, JSDValue* jsdval)
|
|||
}
|
||||
|
||||
JSString*
|
||||
jsd_GetValueFunctionName(JSDContext* jsdc, JSDValue* jsdval)
|
||||
jsd_GetValueFunctionId(JSDContext* jsdc, JSDValue* jsdval)
|
||||
{
|
||||
JSContext* cx = jsdc->dumbContext;
|
||||
JSFunction* fun;
|
||||
|
|
|
@ -991,7 +991,7 @@ jsdScript::jsdScript (JSDContext *aCx, JSDScript *aScript) : mValid(PR_FALSE),
|
|||
mFileName = new nsCString(JSD_GetScriptFilename(mCx, mScript));
|
||||
mFunctionName = new nsCString();
|
||||
if (mFunctionName) {
|
||||
JSString *str = JSD_GetScriptFunctionName(mCx, mScript);
|
||||
JSString *str = JSD_GetScriptFunctionId(mCx, mScript);
|
||||
if (str)
|
||||
AssignToJSString(mFunctionName, str);
|
||||
}
|
||||
|
@ -1907,7 +1907,7 @@ NS_IMETHODIMP
|
|||
jsdStackFrame::GetFunctionName(nsACString &_rval)
|
||||
{
|
||||
ASSERT_VALID_EPHEMERAL;
|
||||
JSString *str = JSD_GetNameForStackFrame(mCx, mThreadState, mStackFrameInfo);
|
||||
JSString *str = JSD_GetIdForStackFrame(mCx, mThreadState, mStackFrameInfo);
|
||||
if (str)
|
||||
return AssignToJSString(&_rval, str);
|
||||
|
||||
|
@ -2239,7 +2239,7 @@ NS_IMETHODIMP
|
|||
jsdValue::GetJsFunctionName(nsACString &_rval)
|
||||
{
|
||||
ASSERT_VALID_EPHEMERAL;
|
||||
return AssignToJSString(&_rval, JSD_GetValueFunctionName(mCx, mValue));
|
||||
return AssignToJSString(&_rval, JSD_GetValueFunctionId(mCx, mValue));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -303,11 +303,11 @@ JSD_GetScriptFilename(JSDContext* jsdc, JSDScript *jsdscript)
|
|||
}
|
||||
|
||||
JSD_PUBLIC_API(JSString *)
|
||||
JSD_GetScriptFunctionName(JSDContext* jsdc, JSDScript *jsdscript)
|
||||
JSD_GetScriptFunctionId(JSDContext* jsdc, JSDScript *jsdscript)
|
||||
{
|
||||
JSD_ASSERT_VALID_CONTEXT(jsdc);
|
||||
JSD_ASSERT_VALID_SCRIPT(jsdscript);
|
||||
return jsd_GetScriptFunctionName(jsdc, jsdscript);
|
||||
return jsd_GetScriptFunctionId(jsdc, jsdscript);
|
||||
}
|
||||
|
||||
JSD_PUBLIC_API(uintN)
|
||||
|
@ -750,12 +750,12 @@ JSD_GetThisForStackFrame(JSDContext* jsdc,
|
|||
}
|
||||
|
||||
JSD_PUBLIC_API(JSString *)
|
||||
JSD_GetNameForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe)
|
||||
JSD_GetIdForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe)
|
||||
{
|
||||
JSD_ASSERT_VALID_CONTEXT(jsdc);
|
||||
return jsd_GetNameForStackFrame(jsdc, jsdthreadstate, jsdframe);
|
||||
return jsd_GetIdForStackFrame(jsdc, jsdthreadstate, jsdframe);
|
||||
}
|
||||
|
||||
JSD_PUBLIC_API(JSBool)
|
||||
|
@ -1117,11 +1117,11 @@ JSD_GetValueString(JSDContext* jsdc, JSDValue* jsdval)
|
|||
}
|
||||
|
||||
JSD_PUBLIC_API(JSString *)
|
||||
JSD_GetValueFunctionName(JSDContext* jsdc, JSDValue* jsdval)
|
||||
JSD_GetValueFunctionId(JSDContext* jsdc, JSDValue* jsdval)
|
||||
{
|
||||
JSD_ASSERT_VALID_CONTEXT(jsdc);
|
||||
JSD_ASSERT_VALID_VALUE(jsdval);
|
||||
return jsd_GetValueFunctionName(jsdc, jsdval);
|
||||
return jsd_GetValueFunctionId(jsdc, jsdval);
|
||||
}
|
||||
|
||||
JSD_PUBLIC_API(JSFunction*)
|
||||
|
|
|
@ -430,10 +430,11 @@ JSD_GetScriptFilename(JSDContext* jsdc, JSDScript *jsdscript);
|
|||
|
||||
/*
|
||||
* Get the function name associated with this script (NULL if not a function).
|
||||
* If the function does not have a name the result is an empty string.
|
||||
* If the function does not have a name the result is the string "anonymous".
|
||||
* *** new for gecko 2.0 ****
|
||||
*/
|
||||
extern JSD_PUBLIC_API(JSString *)
|
||||
JSD_GetScriptFunctionName(JSDContext* jsdc, JSDScript *jsdscript);
|
||||
JSD_GetScriptFunctionId(JSDContext* jsdc, JSDScript *jsdscript);
|
||||
|
||||
/*
|
||||
* Get the base linenumber of the sourcefile from which this script was loaded.
|
||||
|
@ -961,11 +962,12 @@ JSD_GetThisForStackFrame(JSDContext* jsdc,
|
|||
/*
|
||||
* Get the name of the function executing in this stack frame. Especially useful
|
||||
* for native frames (without script objects.)
|
||||
* *** new for gecko 2.0 ****
|
||||
*/
|
||||
extern JSD_PUBLIC_API(JSString *)
|
||||
JSD_GetNameForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe);
|
||||
JSD_GetIdForStackFrame(JSDContext* jsdc,
|
||||
JSDThreadState* jsdthreadstate,
|
||||
JSDStackFrameInfo* jsdframe);
|
||||
|
||||
/*
|
||||
* True if stack frame represents a frame created as a result of a debugger
|
||||
|
@ -1293,10 +1295,10 @@ JSD_GetValueString(JSDContext* jsdc, JSDValue* jsdval);
|
|||
|
||||
/*
|
||||
* Return name of function IFF JSDValue represents a function.
|
||||
* *** new for version 1.1 ****
|
||||
* *** new for gecko 2.0 ****
|
||||
*/
|
||||
extern JSD_PUBLIC_API(JSString *)
|
||||
JSD_GetValueFunctionName(JSDContext* jsdc, JSDValue* jsdval);
|
||||
JSD_GetValueFunctionId(JSDContext* jsdc, JSDValue* jsdval);
|
||||
|
||||
/*
|
||||
* Return function object IFF JSDValue represents a function or an object
|
||||
|
|
Загрузка…
Ссылка в новой задаче