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

Unified Diff: Source/core/inspector/CodeGeneratorInspectorStrings.py

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 7 years, 6 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 | « Source/core/inspector/CodeGeneratorInspector.py ('k') | Source/core/inspector/InspectorAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/CodeGeneratorInspectorStrings.py
diff --git a/Source/core/inspector/CodeGeneratorInspectorStrings.py b/Source/core/inspector/CodeGeneratorInspectorStrings.py
index 8131ff25eb179e6caab8a3ca7237ba63ae90ed56..961b0b173e2f9e93910b1f193a37a102524b97e4 100644
--- a/Source/core/inspector/CodeGeneratorInspectorStrings.py
+++ b/Source/core/inspector/CodeGeneratorInspectorStrings.py
@@ -48,7 +48,8 @@ backend_method = (
{
RefPtr<InspectorArray> protocolErrors = InspectorArray::create();
- if (!$agentField)
+ $handlerClass* handler = $agentField ? $agentField->commandHandler() : 0;
+ if (!handler)
protocolErrors->pushString("${domainName} handler is not available.");
$methodOutCode
$methodInCode
@@ -56,7 +57,7 @@ $methodInCode
RefPtr<InspectorValue> resultErrorData;
ErrorString error;
if (!protocolErrors->length()) {
- $agentField->$methodName(&error$agentCallParams);
+ handler->$methodName(&error$agentCallParams);
$errorCook${responseCook}
}
« no previous file with comments | « Source/core/inspector/CodeGeneratorInspector.py ('k') | Source/core/inspector/InspectorAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698