зеркало из https://github.com/mozilla/gecko-dev.git
Add API for JSD to get the parent of a scope object, no bug.
This commit is contained in:
Родитель
bdc95774d5
Коммит
8b23a66e17
|
@ -747,7 +747,7 @@ jsd_GetValueParent(JSDContext* jsdc, JSDValue* jsdval)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
parent = JS_GetParent(jsdc->dumbContext,obj);
|
||||
parent = JS_GetParentOrScopeChain(jsdc->dumbContext,obj);
|
||||
JS_LeaveCrossCompartmentCall(call);
|
||||
JS_EndRequest(jsdc->dumbContext);
|
||||
if(!parent)
|
||||
|
|
|
@ -619,6 +619,12 @@ JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fpArg)
|
|||
return &fp->callee();
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetParentOrScopeChain(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
return obj->scopeChain();
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp)
|
||||
{
|
||||
|
|
|
@ -279,6 +279,9 @@ JS_GetFrameFunction(JSContext *cx, JSStackFrame *fp);
|
|||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp);
|
||||
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetParentOrScopeChain(JSContext *cx, JSObject *obj);
|
||||
|
||||
/* XXXrginda Initially published with typo */
|
||||
#define JS_IsContructorFrame JS_IsConstructorFrame
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
|
|
Загрузка…
Ссылка в новой задаче