本文整理汇总了C++中HandleScript::isDebuggee方法的典型用法代码示例。如果您正苦于以下问题:C++ HandleScript::isDebuggee方法的具体用法?C++ HandleScript::isDebuggee怎么用?C++ HandleScript::isDebuggee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HandleScript
的用法示例。
在下文中一共展示了HandleScript::isDebuggee方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iter
void
InterpreterFrame::initExecuteFrame(JSContext *cx, HandleScript script, AbstractFramePtr evalInFramePrev,
const Value &thisv, HandleObject scopeChain, ExecuteType type)
{
/*
* See encoding of ExecuteType. When GLOBAL isn't set, we are executing a
* script in the context of another frame and the frame type is determined
* by the context.
*/
flags_ = type | HAS_SCOPECHAIN;
JSObject *callee = nullptr;
if (!(flags_ & (GLOBAL))) {
if (evalInFramePrev) {
MOZ_ASSERT(evalInFramePrev.isFunctionFrame() || evalInFramePrev.isGlobalFrame());
if (evalInFramePrev.isFunctionFrame()) {
callee = evalInFramePrev.callee();
flags_ |= FUNCTION;
} else {
flags_ |= GLOBAL;
}
} else {
FrameIter iter(cx);
MOZ_ASSERT(iter.isFunctionFrame() || iter.isGlobalFrame());
MOZ_ASSERT(!iter.isAsmJS());
if (iter.isFunctionFrame()) {
callee = iter.callee(cx);
flags_ |= FUNCTION;
} else {
flags_ |= GLOBAL;
}
}
}
Value *dstvp = (Value *)this - 2;
dstvp[1] = thisv;
if (isFunctionFrame()) {
dstvp[0] = ObjectValue(*callee);
exec.fun = &callee->as<JSFunction>();
u.evalScript = script;
} else {
MOZ_ASSERT(isGlobalFrame());
dstvp[0] = NullValue();
exec.script = script;
#ifdef DEBUG
u.evalScript = (JSScript *)0xbad;
#endif
}
scopeChain_ = scopeChain.get();
prev_ = nullptr;
prevpc_ = nullptr;
prevsp_ = nullptr;
MOZ_ASSERT_IF(evalInFramePrev, isDebuggerEvalFrame());
evalInFramePrev_ = evalInFramePrev;
if (script->isDebuggee())
setIsDebuggee();
#ifdef DEBUG
Debug_SetValueRangeToCrashOnTouch(&rval_, 1);
#endif
}