Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: inspector/InjectedScriptHost.cpp

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « inspector/InjectedScriptHost.h ('k') | inspector/InjectedScriptHost.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « inspector/InjectedScriptHost.h ('k') | inspector/InjectedScriptHost.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698