| Index: inspector/InjectedScriptHost.cpp
|
| ===================================================================
|
| --- inspector/InjectedScriptHost.cpp (revision 53180)
|
| +++ inspector/InjectedScriptHost.cpp (working copy)
|
| @@ -98,20 +98,6 @@
|
| return 0;
|
| }
|
|
|
| -ScriptValue InjectedScriptHost::wrapObject(const ScriptValue& object, const String& objectGroup)
|
| -{
|
| - if (m_inspectorController)
|
| - return m_inspectorController->wrapObject(object, objectGroup);
|
| - return ScriptValue();
|
| -}
|
| -
|
| -ScriptValue InjectedScriptHost::unwrapObject(const String& objectId)
|
| -{
|
| - if (m_inspectorController)
|
| - return m_inspectorController->unwrapObject(objectId);
|
| - return ScriptValue();
|
| -}
|
| -
|
| long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI)
|
| {
|
| InspectorFrontend* frontend = inspectorFrontend();
|
| @@ -191,6 +177,19 @@
|
| m_idToInjectedScript.clear();
|
| }
|
|
|
| +void InjectedScriptHost::releaseWrapperObjectGroup(long injectedScriptId, const String& objectGroup)
|
| +{
|
| + if (injectedScriptId) {
|
| + ScriptObject injectedScript = m_idToInjectedScript.get(injectedScriptId);
|
| + if (!injectedScript.hasNoValue())
|
| + releaseWrapperObjectGroup(injectedScript, objectGroup);
|
| + } else {
|
| + // Iterate over all injected scripts if injectedScriptId is not specified.
|
| + for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it != m_idToInjectedScript.end(); ++it)
|
| + releaseWrapperObjectGroup(it->second, objectGroup);
|
| + }
|
| +}
|
| +
|
| InspectorDOMAgent* InjectedScriptHost::inspectorDOMAgent()
|
| {
|
| if (!m_inspectorController)
|
| @@ -205,6 +204,13 @@
|
| return m_inspectorController->m_frontend.get();
|
| }
|
|
|
| +void InjectedScriptHost::releaseWrapperObjectGroup(const ScriptObject& injectedScript, const String& objectGroup)
|
| +{
|
| + ScriptFunctionCall releaseFunction(injectedScript.scriptState(), injectedScript, "releaseWrapperObjectGroup");
|
| + releaseFunction.appendArgument(objectGroup);
|
| + releaseFunction.call();
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|
| #endif // ENABLE(INSPECTOR)
|
|
|