本文整理汇总了C++中InjectedScript::releaseObjectGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ InjectedScript::releaseObjectGroup方法的具体用法?C++ InjectedScript::releaseObjectGroup怎么用?C++ InjectedScript::releaseObjectGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InjectedScript
的用法示例。
在下文中一共展示了InjectedScript::releaseObjectGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resolveAnimation
void InspectorAnimationAgent::resolveAnimation(ErrorString* errorString, const String& animationId, RefPtr<TypeBuilder::Runtime::RemoteObject>& result)
{
Animation* animation = assertAnimation(errorString, animationId);
if (!animation)
return;
if (m_idToAnimationClone.get(animationId))
animation = m_idToAnimationClone.get(animationId);
const Element* element = toKeyframeEffect(animation->effect())->target();
Document* document = element->ownerDocument();
LocalFrame* frame = document ? document->frame() : nullptr;
if (!frame) {
*errorString = "Element not associated with a document.";
return;
}
ScriptState* scriptState = ScriptState::forMainWorld(frame);
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
if (injectedScript.isEmpty())
return;
ScriptState::Scope scope(scriptState);
v8::Isolate* isolate = scriptState->isolate();
ScriptValue scriptValue = ScriptValue(scriptState, toV8(animation, scriptState->context()->Global(), isolate));
injectedScript.releaseObjectGroup("animation");
result = injectedScript.wrapObject(scriptValue, "animation");
}