本文整理匯總了C++中Breakpoint::asWasm方法的典型用法代碼示例。如果您正苦於以下問題:C++ Breakpoint::asWasm方法的具體用法?C++ Breakpoint::asWasm怎麽用?C++ Breakpoint::asWasm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Breakpoint
的用法示例。
在下文中一共展示了Breakpoint::asWasm方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: sites
bool
DebugState::clearBreakpointsIn(JSContext* cx, WasmInstanceObject* instance, js::Debugger* dbg, JSObject* handler)
{
MOZ_ASSERT(instance);
if (!breakpointSites_.initialized())
return true;
// Make copy of all sites list, so breakpointSites_ can be modified by
// destroyBreakpointSite calls.
Vector<WasmBreakpointSite*> sites(cx);
if (!sites.resize(breakpointSites_.count()))
return false;
size_t i = 0;
for (WasmBreakpointSiteMap::Range r = breakpointSites_.all(); !r.empty(); r.popFront())
sites[i++] = r.front().value();
for (WasmBreakpointSite* site : sites) {
Breakpoint* nextbp;
for (Breakpoint* bp = site->firstBreakpoint(); bp; bp = nextbp) {
nextbp = bp->nextInSite();
if (bp->asWasm()->wasmInstance == instance &&
(!dbg || bp->debugger == dbg) &&
(!handler || bp->getHandler() == handler))
{
bp->destroy(cx->runtime()->defaultFreeOp());
}
}
}
return true;
}