本文整理汇总了C++中JSDOMWindowShell::world方法的典型用法代码示例。如果您正苦于以下问题:C++ JSDOMWindowShell::world方法的具体用法?C++ JSDOMWindowShell::world怎么用?C++ JSDOMWindowShell::world使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSDOMWindowShell
的用法示例。
在下文中一共展示了JSDOMWindowShell::world方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: restore
void ScriptCachedFrameData::restore(Frame& frame)
{
JSLockHolder lock(JSDOMWindowBase::commonVM());
Page* page = frame.page();
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();
DOMWrapperWorld* world = &windowShell->world();
if (JSDOMWindow* window = m_windows.get(world).get())
windowShell->setWindow(window->vm(), window);
else {
DOMWindow* domWindow = frame.document()->domWindow();
if (&windowShell->window()->impl() == domWindow)
continue;
windowShell->setWindow(domWindow);
if (page) {
scriptController.attachDebugger(windowShell, page->debugger());
windowShell->window()->setProfileGroup(page->group().identifier());
}
}
if (page)
windowShell->window()->setConsoleClient(&page->console());
}
}
示例2: updateDocument
void ScriptController::updateDocument()
{
Vector<JSC::Strong<JSDOMWindowShell>> windowShells = this->windowShells();
for (size_t i = 0; i < windowShells.size(); ++i) {
JSDOMWindowShell* windowShell = windowShells[i].get();
JSLockHolder lock(windowShell->world().vm());
windowShell->window()->updateDocument();
}
}
示例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);
}