本文整理汇总了C++中JSDOMWindow::vm方法的典型用法代码示例。如果您正苦于以下问题:C++ JSDOMWindow::vm方法的具体用法?C++ JSDOMWindow::vm怎么用?C++ JSDOMWindow::vm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSDOMWindow
的用法示例。
在下文中一共展示了JSDOMWindow::vm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attachDebugger
void ScriptController::attachDebugger(JSDOMWindowShell* shell, JSC::Debugger* debugger)
{
if (!shell)
return;
JSDOMWindow* globalObject = shell->window();
JSLockHolder lock(globalObject->vm());
if (debugger)
debugger->attach(globalObject);
else if (JSC::Debugger* currentDebugger = globalObject->debugger())
currentDebugger->detach(globalObject, JSC::Debugger::TerminatingDebuggingSession);
}
示例2: lock
ScriptCachedFrameData::ScriptCachedFrameData(Frame& frame)
{
JSLockHolder lock(JSDOMWindowBase::commonVM());
ScriptController& scriptController = frame.script();
ScriptController::ShellMap& windowShells = scriptController.m_windowShells;
ScriptController::ShellMap::iterator windowShellsEnd = windowShells.end();
for (ScriptController::ShellMap::iterator iter = windowShells.begin(); iter != windowShellsEnd; ++iter) {
JSDOMWindow* window = iter->value->window();
m_windows.add(iter->key.get(), Strong<JSDOMWindow>(window->vm(), window));
}
scriptController.attachDebugger(0);
}
示例3: lock
ScriptCachedFrameData::ScriptCachedFrameData(Frame& frame)
{
JSLockHolder lock(JSDOMWindowBase::commonVM());
ScriptController& scriptController = frame.script();
Vector<JSC::Strong<JSDOMWindowShell>> windowShells = scriptController.windowShells();
for (size_t i = 0; i < windowShells.size(); ++i) {
JSDOMWindowShell* windowShell = windowShells[i].get();
JSDOMWindow* window = windowShell->window();
m_windows.add(&windowShell->world(), Strong<JSDOMWindow>(window->vm(), window));
window->setConsoleClient(nullptr);
}
scriptController.attachDebugger(nullptr);
}