Changeset 63952 in webkit
- Timestamp:
- Jul 22, 2010 11:39:07 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63950 r63952 1 2010-07-22 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 WebInspector: CodeGeneratorInspector was extended and now it can 6 generate InspectorBackedDispatcher's code. This dispatcher will 7 validate and dispatch incoming inspector commands only by native 8 code without using javaScript. That is necessary step for 9 RemoteDebugging support. 10 https://bugs.webkit.org/show_bug.cgi?id=42588 11 12 * GNUmakefile.am: 13 * WebCore.gyp/WebCore.gyp: 14 * WebCore.gypi: 15 * WebCore.pri: 16 * WebCore.vcproj/WebCore.vcproj: 17 * WebCore.xcodeproj/project.pbxproj: 18 * inspector/CodeGeneratorInspector.pm: 19 * inspector/InspectorController.cpp: 20 (WebCore::InspectorController::InspectorController): 21 * inspector/InspectorController.h: 22 (WebCore::InspectorController::inspectorBackendDispatcher): 23 * inspector/front-end/ElementsPanel.js: 24 (WebInspector.ElementsPanel.prototype.setDocument): 25 1 26 2010-07-22 Shinichiro Hamaji <hamaji@chromium.org> 2 27 -
trunk/WebCore/GNUmakefile.am
r63927 r63952 100 100 DerivedSources/WebCore/HTMLNames.cpp \ 101 101 DerivedSources/WebCore/HTMLNames.h \ 102 DerivedSources/WebCore/InspectorBackendDispatcher.cpp \ 103 DerivedSources/WebCore/InspectorBackendDispatcher.h \ 102 104 DerivedSources/WebCore/JSAbstractWorker.cpp \ 103 105 DerivedSources/WebCore/JSAbstractWorker.h \ … … 4397 4399 $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in --outputDir "$(GENSOURCES_WEBCORE)" 4398 4400 4399 # Remote Inspector frontend4400 DerivedSources/WebCore/RemoteInspectorFrontend.cpp DerivedSources/WebCore/RemoteInspectorFrontend.h : $(WebCore)/inspector/Inspector.idl $(SCRIPTS_BINDINGS) $(WebCore)/inspector/CodeGeneratorInspector.pm4401 # RemoteInspectorFrontend and InspectorBackendDispatcher 4402 DerivedSources/WebCore/RemoteInspectorFrontend.cpp DerivedSources/WebCore/RemoteInspectorFrontend.h DerivedSources/WebCore/InspectorBackendDispatcher.cpp DerivedSources/WebCore/InspectorBackendDispatcher.h: $(WebCore)/inspector/Inspector.idl $(SCRIPTS_BINDINGS) $(WebCore)/inspector/CodeGeneratorInspector.pm 4401 4403 $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts -I$(WebCore)/inspector $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator Inspector $< 4402 4404 -
trunk/WebCore/WebCore.gyp/WebCore.gyp
r63803 r63952 477 477 { 478 478 'action_name': 'RemoteInspectorFrontend', 479 # The second input item will be used as item name in vcproj. 480 # It is not possible to put Inspector.idl there because 481 # all idl files are marking as excluded by gyp generator. 479 482 'inputs': [ 480 483 '../bindings/scripts/generate-bindings.pl', 484 '../inspector/CodeGeneratorInspector.pm', 481 485 '../bindings/scripts/CodeGenerator.pm', 482 486 '../bindings/scripts/IDLParser.pm', 483 487 '../bindings/scripts/IDLStructure.pm', 484 '../inspector/CodeGeneratorInspector.pm',485 488 '../inspector/Inspector.idl', 486 489 ], 487 490 'outputs': [ 491 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp', 492 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/InspectorBackendDispatcher.h', 488 493 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp', 489 494 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend.h', … … 506 511 '<@(generator_include_dirs)' 507 512 ], 508 'message': 'Generating RemoteInspectorFrontend class from Inspector.idl',513 'message': 'Generating Inspector interface classes from Inspector.idl', 509 514 }, 510 515 { … … 715 720 # Additional .cpp files from the webcore_inspector_sources list. 716 721 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp', 722 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp', 717 723 ], 718 724 'conditions': [ -
trunk/WebCore/WebCore.gypi
r63927 r63952 278 278 'xml/XPathResult.idl', 279 279 'xml/XSLTProcessor.idl', 280 ],281 'webcore_inspector_idl_files': [282 'inspector/Inspector.idl',283 280 ], 284 281 'webcore_svg_bindings_idl_files': [ -
trunk/WebCore/WebCore.pri
r63902 r63952 817 817 818 818 # GENERATOR 2: inspector idl compiler 819 inspectorIDL.output = $${WC_GENERATED_SOURCES_DIR}/Remote${QMAKE_FILE_BASE}Frontend.cpp 819 inspectorIDL.output = $${WC_GENERATED_SOURCES_DIR}/Remote${QMAKE_FILE_BASE}Frontend.cpp $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}BackendDispatcher.cpp 820 820 inspectorIDL.input = INSPECTOR_INTERFACES 821 821 inspectorIDL.wkScript = $$PWD/bindings/scripts/generate-bindings.pl -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r63927 r63952 20742 20742 </File> 20743 20743 <File 20744 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.h" 20745 > 20746 </File> 20747 <File 20748 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\InspectorBackendDispatcher.h" 20749 > 20750 </File> 20751 <File 20744 20752 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend.cpp" 20745 20753 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r63927 r63952 1031 1031 4F3289B611A42AAB005ABE7E /* InspectorValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F3289B411A42AAB005ABE7E /* InspectorValues.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1032 1032 4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */; }; 1033 4F707A9911EF679400ACDA69 /* InspectorBackendDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F707A9711EF679400ACDA69 /* InspectorBackendDispatcher.cpp */; }; 1034 4F707A9A11EF679400ACDA69 /* InspectorBackendDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F707A9811EF679400ACDA69 /* InspectorBackendDispatcher.h */; }; 1033 1035 4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; }; 1034 1036 4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; }; … … 6778 6780 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteInspectorFrontend.cpp; sourceTree = "<group>"; }; 6779 6781 4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorFrontend.h; sourceTree = "<group>"; }; 6782 4F707A9711EF679400ACDA69 /* InspectorBackendDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackendDispatcher.cpp; sourceTree = "<group>"; }; 6783 4F707A9811EF679400ACDA69 /* InspectorBackendDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBackendDispatcher.h; sourceTree = "<group>"; }; 6780 6784 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; }; 6781 6785 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; }; … … 11439 11443 9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */, 11440 11444 9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */, 11445 4F707A9711EF679400ACDA69 /* InspectorBackendDispatcher.cpp */, 11446 4F707A9811EF679400ACDA69 /* InspectorBackendDispatcher.h */, 11441 11447 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */, 11442 11448 4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend.h */, … … 19851 19857 5162C7F511F77EFB00612EFE /* SchemeRegistry.h in Headers */, 19852 19858 BCDF317C11F8D683003C5BF8 /* UserTypingGestureIndicator.h in Headers */, 19859 4F707A9A11EF679400ACDA69 /* InspectorBackendDispatcher.h in Headers */, 19853 19860 ); 19854 19861 runOnlyForDeploymentPostprocessing = 0; … … 22246 22253 5162C7F411F77EFB00612EFE /* SchemeRegistry.cpp in Sources */, 22247 22254 BCDF317B11F8D683003C5BF8 /* UserTypingGestureIndicator.cpp in Sources */, 22255 4F707A9911EF679400ACDA69 /* InspectorBackendDispatcher.cpp in Sources */, 22248 22256 ); 22249 22257 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/inspector/CodeGeneratorInspector.pm
r63803 r63952 14 14 "forward" => "InspectorClient", 15 15 "header" => "InspectorClient.h", 16 }; 17 $typeTransform{"InspectorBackend"} = { 18 "forward" => "InspectorBackend", 19 "header" => "InspectorBackend.h", 16 20 }; 17 21 $typeTransform{"PassRefPtr"} = { … … 95 99 96 100 my $namespace; 101 102 my $backendClassName; 103 my %backendTypes; 104 my %backendMethods; 105 my @backendMethodsImpl; 106 my $backendConstructor; 107 my $backendFooter; 97 108 98 109 my $frontendClassName; … … 151 162 $frontendTypes{"PassRefPtr"} = 1; 152 163 164 $backendClassName = $className . "BackendDispatcher"; 165 my @backendHead; 166 push(@backendHead, " ${backendClassName}(InspectorBackend* inspectorBackend) : m_inspectorBackend(inspectorBackend) { }"); 167 push(@backendHead, " void dispatch(const String& message, String* exception);"); 168 push(@backendHead, "private:"); 169 $backendConstructor = join("\n", @backendHead); 170 $backendFooter = " InspectorBackend* m_inspectorBackend;"; 171 $backendTypes{"InspectorBackend"} = 1; 172 $backendTypes{"PassRefPtr"} = 1; 173 $backendTypes{"Array"} = 1; 174 153 175 generateFunctions($interface); 154 176 } … … 160 182 foreach my $function (@{$interface->functions}) { 161 183 generateFrontendFunction($function); 184 generateBackendFunction($function); 162 185 } 186 push(@backendMethodsImpl, generateBackendDispatcher()); 163 187 } 164 188 … … 199 223 } 200 224 225 sub generateBackendFunction 226 { 227 my $function = shift; 228 return if $function->signature->extendedAttributes->{"notify"}; 229 230 my $functionName = $function->signature->name; 231 232 my @argsFiltered = grep($_->direction eq "in", @{$function->parameters}); 233 map($backendTypes{$_->type} = 1, @argsFiltered); # register required types 234 my $arguments = join(", ", map($typeTransform{$_->type}->{"param"} . " " . $_->name, @argsFiltered)); 235 236 my $signature = " void ${functionName}(PassRefPtr<InspectorArray> args);"; 237 !$backendMethods{${signature}} || die "Duplicate function was detected for signature '$signature'."; 238 $backendMethods{${signature}} = $functionName; 239 240 my @function; 241 # Skip parameter name if no arguments in the array. Just to avoid unused parameter warning. 242 push(@function, "void ${backendClassName}::${functionName}(PassRefPtr<InspectorArray>" . ( scalar(@argsFiltered) ? " args)" : ")")); 243 push(@function, "{"); 244 my $i = 1; # zero element is the method name. 245 foreach my $parameter (@argsFiltered) { 246 push(@function, " " . $typeTransform{$parameter->type}->{"retVal"} . " " . $parameter->name . ";"); 247 push(@function, " if (!args->get(" . $i . ")->as" . $typeTransform{$parameter->type}->{"accessorSuffix"} . "(&" . $parameter->name . ")) {"); 248 push(@function, " ASSERT_NOT_REACHED();"); 249 push(@function, " return;"); 250 push(@function, " }"); 251 ++$i; 252 } 253 push(@function, " m_inspectorBackend->$functionName(" . join(", ", map($_->name, @argsFiltered)) . ");"); 254 push(@function, "}"); 255 push(@function, ""); 256 push(@backendMethodsImpl, @function); 257 } 258 259 sub generateBackendDispatcher 260 { 261 my @body; 262 my @methods = map($backendMethods{$_}, keys %backendMethods); 263 my @mapEntries = map("dispatchMap.add(\"$_\", &${backendClassName}::$_);", @methods); 264 265 push(@body, "void ${backendClassName}::dispatch(const String& message, String* exception)"); 266 push(@body, "{"); 267 push(@body, " typedef void (${backendClassName}::*CallHandler)(PassRefPtr<InspectorArray> args);"); 268 push(@body, " typedef HashMap<String, CallHandler> DispatchMap;"); 269 push(@body, " DEFINE_STATIC_LOCAL(DispatchMap, dispatchMap, );"); 270 push(@body, " if (dispatchMap.isEmpty()) {"); 271 push(@body, map(" $_", @mapEntries)); 272 push(@body, " }"); 273 push(@body, ""); 274 push(@body, " RefPtr<InspectorValue> parsedMessage = InspectorValue::parseJSON(message);"); 275 push(@body, " if (!parsedMessage) {"); 276 push(@body, " ASSERT_NOT_REACHED();"); 277 push(@body, " *exception = \"Error: Invalid message format. Message should be in JSON format.\";"); 278 push(@body, " return;"); 279 push(@body, " }"); 280 push(@body, ""); 281 push(@body, " RefPtr<InspectorArray> messageArray = parsedMessage->asArray();"); 282 push(@body, " if (!messageArray) {"); 283 push(@body, " ASSERT_NOT_REACHED();"); 284 push(@body, " *exception = \"Error: Invalid message format. The message should be a JSONified array of arguments.\";"); 285 push(@body, " return;"); 286 push(@body, " }"); 287 push(@body, ""); 288 push(@body, " if (!messageArray->length()) {"); 289 push(@body, " ASSERT_NOT_REACHED();"); 290 push(@body, " *exception = \"Error: Invalid message format. Empty message was received.\";"); 291 push(@body, " return;"); 292 push(@body, " }"); 293 push(@body, ""); 294 push(@body, " String methodName;"); 295 push(@body, " if (!messageArray->get(0)->asString(&methodName)) {"); 296 push(@body, " ASSERT_NOT_REACHED();"); 297 push(@body, " *exception = \"Error: Invalid message format. The first element of the message should be method name.\";"); 298 push(@body, " return;"); 299 push(@body, " }"); 300 push(@body, ""); 301 push(@body, " HashMap<String, CallHandler>::iterator it = dispatchMap.find(methodName);"); 302 push(@body, " if (it == dispatchMap.end()) {"); 303 push(@body, " ASSERT_NOT_REACHED();"); 304 push(@body, " String::format(\"Error: Invalid method name. '%s' wasn't found.\", methodName.utf8().data());"); 305 push(@body, " return;"); 306 push(@body, " }"); 307 push(@body, ""); 308 push(@body, " ((*this).*it->second)(messageArray);"); 309 push(@body, "}"); 310 return @body; 311 } 312 201 313 sub generateHeader 202 314 { … … 285 397 undef($HEADER); 286 398 399 open($SOURCE, ">$outputDir/$backendClassName.cpp") || die "Couldn't open file $outputDir/$backendClassName.cpp"; 400 print $SOURCE join("\n", generateSource($backendClassName, \%backendTypes, \@backendMethodsImpl)); 401 close($SOURCE); 402 undef($SOURCE); 403 404 open($HEADER, ">$outputHeadersDir/$backendClassName.h") || die "Couldn't open file $outputHeadersDir/$backendClassName.h"; 405 print $HEADER join("\n", generateHeader($backendClassName, \%backendTypes, $backendConstructor, \%backendMethods, $backendFooter)); 406 close($HEADER); 407 undef($HEADER); 287 408 } 288 409 -
trunk/WebCore/inspector/InspectorController.cpp
r63891 r63952 56 56 #include "InjectedScriptHost.h" 57 57 #include "InspectorBackend.h" 58 #include "InspectorBackendDispatcher.h" 58 59 #include "InspectorCSSStore.h" 59 60 #include "InspectorClient.h" … … 193 194 , m_settingsLoaded(false) 194 195 , m_inspectorBackend(InspectorBackend::create(this)) 196 , m_inspectorBackendDispatcher(new InspectorBackendDispatcher(m_inspectorBackend.get())) 195 197 , m_injectedScriptHost(InjectedScriptHost::create(this)) 196 198 #if ENABLE(JAVASCRIPT_DEBUGGER) -
trunk/WebCore/inspector/InspectorController.h
r63753 r63952 65 65 class InjectedScriptHost; 66 66 class InspectorBackend; 67 class InspectorBackendDispatcher; 67 68 class InspectorClient; 68 69 class InspectorCSSStore; … … 121 122 122 123 InspectorBackend* inspectorBackend() { return m_inspectorBackend.get(); } 124 InspectorBackendDispatcher* inspectorBackendDispatcher() { return m_inspectorBackendDispatcher.get(); } 123 125 InjectedScriptHost* injectedScriptHost() { return m_injectedScriptHost.get(); } 124 126 … … 396 398 bool m_settingsLoaded; 397 399 RefPtr<InspectorBackend> m_inspectorBackend; 400 OwnPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher; 398 401 RefPtr<InjectedScriptHost> m_injectedScriptHost; 399 402 -
trunk/WebCore/inspector/InspectorValues.cpp
r63822 r63952 485 485 } 486 486 487 bool InspectorValue::asNumber(long*) const 488 { 489 return false; 490 } 491 492 bool InspectorValue::asNumber(unsigned long*) const 493 { 494 return false; 495 } 496 487 497 bool InspectorValue::asString(String*) const 488 498 { … … 540 550 return true; 541 551 } 552 553 bool InspectorBasicValue::asNumber(long* output) const 554 { 555 if (type() != TypeDouble) 556 return false; 557 *output = static_cast<long>(m_doubleValue); 558 return true; 559 } 560 561 bool InspectorBasicValue::asNumber(unsigned long* output) const 562 { 563 if (type() != TypeDouble) 564 return false; 565 *output = static_cast<unsigned long>(m_doubleValue); 566 return true; 567 } 568 542 569 543 570 void InspectorBasicValue::writeJSON(Vector<UChar>* output) const -
trunk/WebCore/inspector/InspectorValues.h
r63561 r63952 70 70 virtual bool asBool(bool* output) const; 71 71 virtual bool asNumber(double* output) const; 72 virtual bool asNumber(long* output) const; 73 virtual bool asNumber(unsigned long* output) const; 72 74 virtual bool asString(String* output) const; 73 75 virtual PassRefPtr<InspectorObject> asObject(); … … 106 108 virtual bool asBool(bool* output) const; 107 109 virtual bool asNumber(double* output) const; 110 virtual bool asNumber(long* output) const; 111 virtual bool asNumber(unsigned long* output) const; 108 112 109 113 virtual void writeJSON(Vector<UChar>* output) const; -
trunk/WebCore/inspector/front-end/ElementsPanel.js
r63427 r63952 223 223 if (this._selectedPathOnReset) { 224 224 var callId = WebInspector.Callback.wrap(selectLastSelectedNode.bind(this)); 225 InspectorBackend.pushNodeByPathToFrontend(callId, this._selectedPathOnReset );225 InspectorBackend.pushNodeByPathToFrontend(callId, this._selectedPathOnReset.join(",")); 226 226 } else 227 227 selectNode.call(this); -
trunk/WebKit/chromium/ChangeLog
r63905 r63952 1 2010-07-22 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 WebInspector: CodeGeneratorInspector was extended and now it can 6 generate InspectorBackedDispatcher's code. This dispatcher will 7 validate and dispatch incoming inspector commands only by native 8 code without using javaScript. That is necessary step for 9 RemoteDebugging support. 10 https://bugs.webkit.org/show_bug.cgi?id=42588 11 12 * src/ToolsAgent.h: 13 * src/WebDevToolsAgentImpl.cpp: 14 (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorController): 15 * src/WebDevToolsAgentImpl.h: 16 * src/js/InspectorControllerImpl.js: 17 (devtools.InspectorBackendImpl.prototype.callInspectorController_): 18 1 19 2010-07-22 Darin Fisher <darin@chromium.org> 2 20 -
trunk/WebKit/chromium/src/ToolsAgent.h
r61772 r63952 40 40 #define TOOLS_AGENT_STRUCT(METHOD0, METHOD1, METHOD2, METHOD3, METHOD4, METHOD5) \ 41 41 /* Dispatches given function on the InspectorController object */ \ 42 METHOD 3(dispatchOnInspectorController, int /* call_id */, \43 String /* function_name */, String /* json_args*/) \42 METHOD2(dispatchOnInspectorController, int /* call_id */, \ 43 String /* message */) \ 44 44 \ 45 45 /* Dispatches given function on the InjectedScript object */ \ -
trunk/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
r63311 r63952 39 39 #include "InjectedScriptHost.h" 40 40 #include "InspectorBackend.h" 41 #include "InspectorBackendDispatcher.h" 41 42 #include "InspectorController.h" 42 43 #include "InspectorFrontend.h" … … 309 310 } 310 311 311 void WebDevToolsAgentImpl::dispatchOnInspectorController(int callId, const String& functionName, const String& jsonArgs) 312 { 313 String result; 312 void WebDevToolsAgentImpl::dispatchOnInspectorController(int callId, const String& message) 313 { 314 314 String exception; 315 result = m_debuggerAgentImpl->executeUtilityFunction(m_utilityContext, callId, 316 "InspectorControllerDispatcher", functionName, jsonArgs, false /* is sync */, &exception); 317 m_toolsAgentDelegateStub->didDispatchOn(callId, result, exception); 315 inspectorController()->inspectorBackendDispatcher()->dispatch(message, &exception); 316 m_toolsAgentDelegateStub->didDispatchOn(callId, "", exception); 318 317 } 319 318 -
trunk/WebKit/chromium/src/WebDevToolsAgentImpl.h
r62927 r63952 73 73 74 74 // ToolsAgent implementation. 75 virtual void dispatchOnInspectorController(int callId, const WebCore::String& functionName, const WebCore::String& jsonArgs);75 virtual void dispatchOnInspectorController(int callId, const WebCore::String& message); 76 76 virtual void dispatchOnInjectedScript(int callId, int injectedScriptId, const WebCore::String& functionName, const WebCore::String& jsonArgs, bool async); 77 77 -
trunk/WebKit/chromium/src/js/InspectorControllerImpl.js
r63886 r63952 155 155 { 156 156 var args = Array.prototype.slice.call(arguments, 1); 157 RemoteToolsAgent.dispatchOnInspectorController(WebInspector.Callback.wrap(function(){}), methodName, JSON.stringify(args)); 157 args.unshift(methodName); 158 RemoteToolsAgent.dispatchOnInspectorController(WebInspector.Callback.wrap(function(){}), JSON.stringify(args)); 158 159 }; 159 160
Note: See TracChangeset
for help on using the changeset viewer.