Changeset 190905 in webkit
- Timestamp:
- Oct 12, 2015 4:37:51 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r190904 r190905 1 2015-10-12 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Rebaseline Inspector generator tests and make better use of RWIProtocol constant 4 https://bugs.webkit.org/show_bug.cgi?id=150044 5 6 Reviewed by Brian Burg. 7 8 * inspector/scripts/codegen/generate_objc_configuration_header.py: 9 (ObjCConfigurationHeaderGenerator.generate_output): 10 (ObjCConfigurationHeaderGenerator._generate_configuration_interface_for_domains): 11 * inspector/scripts/codegen/generate_objc_configuration_implementation.py: 12 (ObjCBackendDispatcherImplementationGenerator._generate_configuration_implementation_for_domains): 13 * inspector/scripts/codegen/generate_objc_header.py: 14 (ObjCHeaderGenerator.generate_output): 15 * inspector/scripts/codegen/generate_objc_internal_header.py: 16 (ObjCInternalHeaderGenerator.generate_output): 17 * inspector/scripts/tests/expected/commands-with-async-attribute.json-result: 18 * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result: 19 * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result: 20 * inspector/scripts/tests/expected/enum-values.json-result: 21 * inspector/scripts/tests/expected/events-with-optional-parameters.json-result: 22 * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result: 23 * inspector/scripts/tests/expected/same-type-id-different-domain.json-result: 24 * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result: 25 * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result: 26 * inspector/scripts/tests/expected/type-declaration-array-type.json-result: 27 * inspector/scripts/tests/expected/type-declaration-enum-type.json-result: 28 * inspector/scripts/tests/expected/type-declaration-object-type.json-result: 29 * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result: 30 1 31 2015-10-12 Myles C. Maxfield <mmaxfield@apple.com> 2 32 -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py
r177168 r190905 46 46 def generate_output(self): 47 47 headers = [ 48 ' "%s.h"' % ObjCGenerator.OBJC_PREFIX,48 '<WebInspector/%s.h>' % ObjCGenerator.OBJC_PREFIX, 49 49 ] 50 50 … … 67 67 lines = [] 68 68 lines.append('__attribute__((visibility ("default")))') 69 lines.append('@interface RWIProtocolConfiguration : NSObject')69 lines.append('@interface %sConfiguration : NSObject' % ObjCGenerator.OBJC_PREFIX) 70 70 for domain in domains: 71 71 lines.extend(self._generate_properties_for_domain(domain)) -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py
r176329 r190905 72 72 def _generate_configuration_implementation_for_domains(self, domains): 73 73 lines = [] 74 lines.append('@implementation RWIProtocolConfiguration')74 lines.append('@implementation %sConfiguration' % ObjCGenerator.OBJC_PREFIX) 75 75 lines.append('{') 76 76 lines.append(' AugmentableInspectorController* _controller;') -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py
r177168 r190905 53 53 def generate_output(self): 54 54 headers = set([ 55 '<WebInspector/ RWIProtocolJSONObject.h>',55 '<WebInspector/%sJSONObject.h>' % ObjCGenerator.OBJC_PREFIX, 56 56 ]) 57 57 -
trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py
r176329 r190905 47 47 headers = set([ 48 48 '"%s.h"' % ObjCGenerator.OBJC_PREFIX, 49 '" RWIProtocolJSONObjectInternal.h"',49 '"%sJSONObjectInternal.h"' % ObjCGenerator.OBJC_PREFIX, 50 50 '<JavaScriptCore/InspectorValues.h>', 51 51 '<JavaScriptCore/AugmentableInspectorController.h>', -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 187 188 class DatabaseBackendDispatcher final : public SupplementalBackendDispatcher { 188 189 public: 189 static Ref<DatabaseBackendDispatcher> create(BackendDispatcher *, DatabaseBackendDispatcherHandler*);190 static Ref<DatabaseBackendDispatcher> create(BackendDispatcher&, DatabaseBackendDispatcherHandler*); 190 191 virtual void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override; 191 192 private: … … 244 245 #include "InspectorBackendDispatchers.h" 245 246 246 #include <inspector/InspectorFrontend Channel.h>247 #include <inspector/InspectorFrontendRouter.h> 247 248 #include <inspector/InspectorValues.h> 248 249 #include <wtf/NeverDestroyed.h> … … 257 258 DatabaseBackendDispatcherHandler::~DatabaseBackendDispatcherHandler() { } 258 259 259 Ref<DatabaseBackendDispatcher> DatabaseBackendDispatcher::create(BackendDispatcher *backendDispatcher, DatabaseBackendDispatcherHandler* agent)260 { 261 return adoptRef(*new DatabaseBackendDispatcher( *backendDispatcher, agent));260 Ref<DatabaseBackendDispatcher> DatabaseBackendDispatcher::create(BackendDispatcher& backendDispatcher, DatabaseBackendDispatcherHandler* agent) 261 { 262 return adoptRef(*new DatabaseBackendDispatcher(backendDispatcher, agent)); 262 263 } 263 264 … … 538 539 539 540 #include "InspectorProtocolObjects.h" 540 #include <inspector/InspectorFrontendChannel.h>541 541 #include <inspector/InspectorValues.h> 542 542 #include <wtf/text/WTFString.h> … … 544 544 namespace Inspector { 545 545 546 546 class FrontendRouter; 547 547 548 548 } // namespace Inspector … … 585 585 #include "InspectorFrontendDispatchers.h" 586 586 587 #include "InspectorFrontendRouter.h" 587 588 #include <wtf/text/CString.h> 588 589 … … 932 933 933 934 auto alternateDispatcher = std::make_unique<ObjCInspectorDatabaseBackendDispatcher>(handler); 934 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), WTF::move(alternateDispatcher));935 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), *_controller, WTF::move(alternateDispatcher)); 935 936 _controller->appendExtraAgent(WTF::move(alternateAgent)); 936 937 } … … 977 978 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 978 979 979 #import "RWIProtocol.h"980 #import <WebInspector/RWIProtocol.h> 980 981 981 982 __attribute__((visibility ("default"))) … … 1023 1024 #include "RWIProtocolInternal.h" 1024 1025 #include "RWIProtocolEnumConversionHelpers.h" 1025 #include <JavaScriptCore/InspectorFrontendChannel.h>1026 1026 #include <JavaScriptCore/InspectorValues.h> 1027 1027 … … 1408 1408 1409 1409 #import "RWIProtocolEnumConversionHelpers.h" 1410 #import <JavaScriptCore/InspectorFrontendChannel.h>1411 1410 #import <JavaScriptCore/InspectorValues.h> 1412 1411 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 170 171 class DatabaseBackendDispatcher final : public SupplementalBackendDispatcher { 171 172 public: 172 static Ref<DatabaseBackendDispatcher> create(BackendDispatcher *, DatabaseBackendDispatcherHandler*);173 static Ref<DatabaseBackendDispatcher> create(BackendDispatcher&, DatabaseBackendDispatcherHandler*); 173 174 virtual void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override; 174 175 private: … … 225 226 #include "InspectorBackendDispatchers.h" 226 227 227 #include <inspector/InspectorFrontend Channel.h>228 #include <inspector/InspectorFrontendRouter.h> 228 229 #include <inspector/InspectorValues.h> 229 230 #include <wtf/NeverDestroyed.h> … … 238 239 DatabaseBackendDispatcherHandler::~DatabaseBackendDispatcherHandler() { } 239 240 240 Ref<DatabaseBackendDispatcher> DatabaseBackendDispatcher::create(BackendDispatcher *backendDispatcher, DatabaseBackendDispatcherHandler* agent)241 { 242 return adoptRef(*new DatabaseBackendDispatcher( *backendDispatcher, agent));241 Ref<DatabaseBackendDispatcher> DatabaseBackendDispatcher::create(BackendDispatcher& backendDispatcher, DatabaseBackendDispatcherHandler* agent) 242 { 243 return adoptRef(*new DatabaseBackendDispatcher(backendDispatcher, agent)); 243 244 } 244 245 … … 439 440 440 441 #include "InspectorProtocolObjects.h" 441 #include <inspector/InspectorFrontendChannel.h>442 442 #include <inspector/InspectorValues.h> 443 443 #include <wtf/text/WTFString.h> … … 445 445 namespace Inspector { 446 446 447 447 class FrontendRouter; 448 448 449 449 } // namespace Inspector … … 486 486 #include "InspectorFrontendDispatchers.h" 487 487 488 #include "InspectorFrontendRouter.h" 488 489 #include <wtf/text/CString.h> 489 490 … … 831 832 832 833 auto alternateDispatcher = std::make_unique<ObjCInspectorDatabaseBackendDispatcher>(handler); 833 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), WTF::move(alternateDispatcher));834 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<DatabaseBackendDispatcher, AlternateDatabaseBackendDispatcher>>(ASCIILiteral("Database"), *_controller, WTF::move(alternateDispatcher)); 834 835 _controller->appendExtraAgent(WTF::move(alternateAgent)); 835 836 } … … 876 877 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 877 878 878 #import "RWIProtocol.h"879 #import <WebInspector/RWIProtocol.h> 879 880 880 881 __attribute__((visibility ("default"))) … … 922 923 #include "RWIProtocolInternal.h" 923 924 #include "RWIProtocolEnumConversionHelpers.h" 924 #include <JavaScriptCore/InspectorFrontendChannel.h>925 925 #include <JavaScriptCore/InspectorValues.h> 926 926 … … 1265 1265 1266 1266 #import "RWIProtocolEnumConversionHelpers.h" 1267 #import <JavaScriptCore/InspectorFrontendChannel.h>1268 1267 #import <JavaScriptCore/InspectorValues.h> 1269 1268 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 188 189 class Network1BackendDispatcher final : public SupplementalBackendDispatcher { 189 190 public: 190 static Ref<Network1BackendDispatcher> create(BackendDispatcher *, Network1BackendDispatcherHandler*);191 static Ref<Network1BackendDispatcher> create(BackendDispatcher&, Network1BackendDispatcherHandler*); 191 192 virtual void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override; 192 193 private: … … 205 206 class Network3BackendDispatcher final : public SupplementalBackendDispatcher { 206 207 public: 207 static Ref<Network3BackendDispatcher> create(BackendDispatcher *, Network3BackendDispatcherHandler*);208 static Ref<Network3BackendDispatcher> create(BackendDispatcher&, Network3BackendDispatcherHandler*); 208 209 virtual void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override; 209 210 private: … … 265 266 #include "InspectorBackendDispatchers.h" 266 267 267 #include <inspector/InspectorFrontend Channel.h>268 #include <inspector/InspectorFrontendRouter.h> 268 269 #include <inspector/InspectorValues.h> 269 270 #include <wtf/NeverDestroyed.h> … … 279 280 Network3BackendDispatcherHandler::~Network3BackendDispatcherHandler() { } 280 281 281 Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher *backendDispatcher, Network1BackendDispatcherHandler* agent)282 { 283 return adoptRef(*new Network1BackendDispatcher( *backendDispatcher, agent));282 Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent) 283 { 284 return adoptRef(*new Network1BackendDispatcher(backendDispatcher, agent)); 284 285 } 285 286 … … 326 327 } 327 328 328 Ref<Network3BackendDispatcher> Network3BackendDispatcher::create(BackendDispatcher *backendDispatcher, Network3BackendDispatcherHandler* agent)329 { 330 return adoptRef(*new Network3BackendDispatcher( *backendDispatcher, agent));329 Ref<Network3BackendDispatcher> Network3BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network3BackendDispatcherHandler* agent) 330 { 331 return adoptRef(*new Network3BackendDispatcher(backendDispatcher, agent)); 331 332 } 332 333 … … 550 551 551 552 #include "InspectorProtocolObjects.h" 552 #include <inspector/InspectorFrontendChannel.h>553 553 #include <inspector/InspectorValues.h> 554 554 #include <wtf/text/WTFString.h> … … 556 556 namespace Inspector { 557 557 558 558 class FrontendRouter; 559 559 560 560 } // namespace Inspector … … 597 597 #include "InspectorFrontendDispatchers.h" 598 598 599 #include "InspectorFrontendRouter.h" 599 600 #include <wtf/text/CString.h> 600 601 … … 872 873 873 874 auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler); 874 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), WTF::move(alternateDispatcher));875 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), *_controller, WTF::move(alternateDispatcher)); 875 876 _controller->appendExtraAgent(WTF::move(alternateAgent)); 876 877 } … … 890 891 891 892 auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork3BackendDispatcher>(handler); 892 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network3BackendDispatcher, AlternateNetwork3BackendDispatcher>>(ASCIILiteral("Network3"), WTF::move(alternateDispatcher));893 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network3BackendDispatcher, AlternateNetwork3BackendDispatcher>>(ASCIILiteral("Network3"), *_controller, WTF::move(alternateDispatcher)); 893 894 _controller->appendExtraAgent(WTF::move(alternateAgent)); 894 895 } … … 935 936 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 936 937 937 #import "RWIProtocol.h"938 #import <WebInspector/RWIProtocol.h> 938 939 939 940 __attribute__((visibility ("default"))) … … 982 983 #include "RWIProtocolInternal.h" 983 984 #include "RWIProtocolEnumConversionHelpers.h" 984 #include <JavaScriptCore/InspectorFrontendChannel.h>985 985 #include <JavaScriptCore/InspectorValues.h> 986 986 … … 1190 1190 1191 1191 #import "RWIProtocolEnumConversionHelpers.h" 1192 #import <JavaScriptCore/InspectorFrontendChannel.h>1193 1192 #import <JavaScriptCore/InspectorValues.h> 1194 1193 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 169 170 class CommandDomainBackendDispatcher final : public SupplementalBackendDispatcher { 170 171 public: 171 static Ref<CommandDomainBackendDispatcher> create(BackendDispatcher *, CommandDomainBackendDispatcherHandler*);172 static Ref<CommandDomainBackendDispatcher> create(BackendDispatcher&, CommandDomainBackendDispatcherHandler*); 172 173 virtual void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override; 173 174 private: … … 223 224 #include "InspectorBackendDispatchers.h" 224 225 225 #include <inspector/InspectorFrontend Channel.h>226 #include <inspector/InspectorFrontendRouter.h> 226 227 #include <inspector/InspectorValues.h> 227 228 #include <wtf/NeverDestroyed.h> … … 236 237 CommandDomainBackendDispatcherHandler::~CommandDomainBackendDispatcherHandler() { } 237 238 238 Ref<CommandDomainBackendDispatcher> CommandDomainBackendDispatcher::create(BackendDispatcher *backendDispatcher, CommandDomainBackendDispatcherHandler* agent)239 { 240 return adoptRef(*new CommandDomainBackendDispatcher( *backendDispatcher, agent));239 Ref<CommandDomainBackendDispatcher> CommandDomainBackendDispatcher::create(BackendDispatcher& backendDispatcher, CommandDomainBackendDispatcherHandler* agent) 240 { 241 return adoptRef(*new CommandDomainBackendDispatcher(backendDispatcher, agent)); 241 242 } 242 243 … … 326 327 327 328 #include "InspectorProtocolObjects.h" 328 #include <inspector/InspectorFrontendChannel.h>329 329 #include <inspector/InspectorValues.h> 330 330 #include <wtf/text/WTFString.h> … … 332 332 namespace Inspector { 333 333 334 334 class FrontendRouter; 335 335 336 336 class EventDomainFrontendDispatcher { 337 337 public: 338 EventDomainFrontendDispatcher(Frontend Channel* frontendChannel) : m_frontendChannel(frontendChannel) { }338 EventDomainFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } 339 339 // Named after parameter 'parameter' while generating command/event eventWithEnumParameter. 340 340 enum class Parameter { … … 345 345 void eventWithEnumParameter(Parameter parameter); 346 346 private: 347 Frontend Channel* m_frontendChannel;347 FrontendRouter& m_frontendRouter; 348 348 }; 349 349 … … 387 387 #include "InspectorFrontendDispatchers.h" 388 388 389 #include "InspectorFrontendRouter.h" 389 390 #include <wtf/text/CString.h> 390 391 … … 399 400 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); 400 401 401 m_frontend Channel->sendMessageToFrontend(jsonMessage->toJSONString());402 m_frontendRouter.sendEvent(jsonMessage->toJSONString()); 402 403 } 403 404 … … 679 680 680 681 auto alternateDispatcher = std::make_unique<ObjCInspectorCommandDomainBackendDispatcher>(handler); 681 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<CommandDomainBackendDispatcher, AlternateCommandDomainBackendDispatcher>>(ASCIILiteral("CommandDomain"), WTF::move(alternateDispatcher));682 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<CommandDomainBackendDispatcher, AlternateCommandDomainBackendDispatcher>>(ASCIILiteral("CommandDomain"), *_controller, WTF::move(alternateDispatcher)); 682 683 _controller->appendExtraAgent(WTF::move(alternateAgent)); 683 684 } … … 731 732 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 732 733 733 #import "RWIProtocol.h"734 #import <WebInspector/RWIProtocol.h> 734 735 735 736 __attribute__((visibility ("default"))) … … 778 779 #include "RWIProtocolInternal.h" 779 780 #include "RWIProtocolEnumConversionHelpers.h" 780 #include <JavaScriptCore/InspectorFrontendChannel.h>781 781 #include <JavaScriptCore/InspectorValues.h> 782 782 … … 971 971 972 972 #import "RWIProtocolEnumConversionHelpers.h" 973 #import <JavaScriptCore/InspectorFrontendChannel.h>974 973 #import <JavaScriptCore/InspectorValues.h> 975 974 … … 997 996 - (void)eventWithEnumParameterWithParameter:(RWIProtocolEventDomainEventWithEnumParameterParameter)parameter 998 997 { 999 FrontendChannel* frontendChannel = _controller->frontendChannel(); 1000 if (!frontendChannel) 1001 return; 998 const FrontendRouter& router = _controller->frontendRouter(); 1002 999 1003 1000 Ref<InspectorObject> jsonMessage = InspectorObject::create(); … … 1006 1003 paramsObject->setString(ASCIILiteral("parameter"), toProtocolString(parameter)); 1007 1004 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); 1008 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());1005 router.sendEvent(jsonMessage->toJSONString()); 1009 1006 } 1010 1007 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 179 180 #include "InspectorBackendDispatchers.h" 180 181 181 #include <inspector/InspectorFrontend Channel.h>182 #include <inspector/InspectorFrontendRouter.h> 182 183 #include <inspector/InspectorValues.h> 183 184 #include <wtf/NeverDestroyed.h> … … 231 232 232 233 #include "InspectorProtocolObjects.h" 233 #include <inspector/InspectorFrontendChannel.h>234 234 #include <inspector/InspectorValues.h> 235 235 #include <wtf/text/WTFString.h> … … 237 237 namespace Inspector { 238 238 239 239 class FrontendRouter; 240 240 241 241 class DatabaseFrontendDispatcher { 242 242 public: 243 DatabaseFrontendDispatcher(Frontend Channel* frontendChannel) : m_frontendChannel(frontendChannel) { }243 DatabaseFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } 244 244 void didExecuteOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String* const notes, const double* const timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors* const screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* const printColor); 245 245 void didExecuteNoOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String& notes, double timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors& screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String& printColor); 246 246 private: 247 Frontend Channel* m_frontendChannel;247 FrontendRouter& m_frontendRouter; 248 248 }; 249 249 … … 287 287 #include "InspectorFrontendDispatchers.h" 288 288 289 #include "InspectorFrontendRouter.h" 289 290 #include <wtf/text/CString.h> 290 291 … … 316 317 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); 317 318 318 m_frontend Channel->sendMessageToFrontend(jsonMessage->toJSONString());319 m_frontendRouter.sendEvent(jsonMessage->toJSONString()); 319 320 } 320 321 … … 335 336 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); 336 337 337 m_frontend Channel->sendMessageToFrontend(jsonMessage->toJSONString());338 m_frontendRouter.sendEvent(jsonMessage->toJSONString()); 338 339 } 339 340 … … 693 694 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 694 695 695 #import "RWIProtocol.h"696 #import <WebInspector/RWIProtocol.h> 696 697 697 698 __attribute__((visibility ("default"))) … … 739 740 #include "RWIProtocolInternal.h" 740 741 #include "RWIProtocolEnumConversionHelpers.h" 741 #include <JavaScriptCore/InspectorFrontendChannel.h>742 742 #include <JavaScriptCore/InspectorValues.h> 743 743 … … 829 829 830 830 #import "RWIProtocolEnumConversionHelpers.h" 831 #import <JavaScriptCore/InspectorFrontendChannel.h>832 831 #import <JavaScriptCore/InspectorValues.h> 833 832 … … 851 850 - (void)didExecuteOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ **)columnNames notes:(NSString **)notes timestamp:(double *)timestamp values:(RWIProtocolJSONObject **)values payload:(RWIProtocolJSONObject **)payload sqlError:(RWIProtocolDatabaseError **)sqlError screenColor:(NSString **)screenColor alternateColors:(NSArray/*<NSString>*/ **)alternateColors printColor:(NSString **)printColor 852 851 { 853 FrontendChannel* frontendChannel = _controller->frontendChannel(); 854 if (!frontendChannel) 855 return; 852 const FrontendRouter& router = _controller->frontendRouter(); 856 853 857 854 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(columnNames, @"columnNames"); … … 886 883 paramsObject->setString(ASCIILiteral("printColor"), (*printColor)); 887 884 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); 888 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());885 router.sendEvent(jsonMessage->toJSONString()); 889 886 } 890 887 891 888 - (void)didExecuteNoOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload sqlError:(RWIProtocolDatabaseError *)sqlError screenColor:(NSString *)screenColor alternateColors:(NSArray/*<NSString>*/ *)alternateColors printColor:(NSString *)printColor 892 889 { 893 FrontendChannel* frontendChannel = _controller->frontendChannel(); 894 if (!frontendChannel) 895 return; 890 const FrontendRouter& router = _controller->frontendRouter(); 896 891 897 892 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(columnNames, @"columnNames"); … … 917 912 paramsObject->setString(ASCIILiteral("printColor"), printColor); 918 913 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); 919 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());914 router.sendEvent(jsonMessage->toJSONString()); 920 915 } 921 916 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 165 166 class Network1BackendDispatcher final : public SupplementalBackendDispatcher { 166 167 public: 167 static Ref<Network1BackendDispatcher> create(BackendDispatcher *, Network1BackendDispatcherHandler*);168 static Ref<Network1BackendDispatcher> create(BackendDispatcher&, Network1BackendDispatcherHandler*); 168 169 virtual void dispatch(long requestId, const String& method, Ref<InspectorObject>&& message) override; 169 170 private: … … 220 221 #include "InspectorBackendDispatchers.h" 221 222 222 #include <inspector/InspectorFrontend Channel.h>223 #include <inspector/InspectorFrontendRouter.h> 223 224 #include <inspector/InspectorValues.h> 224 225 #include <wtf/NeverDestroyed.h> … … 236 237 237 238 #if PLATFORM(WEB_COMMANDS) 238 Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher *backendDispatcher, Network1BackendDispatcherHandler* agent)239 { 240 return adoptRef(*new Network1BackendDispatcher( *backendDispatcher, agent));239 Ref<Network1BackendDispatcher> Network1BackendDispatcher::create(BackendDispatcher& backendDispatcher, Network1BackendDispatcherHandler* agent) 240 { 241 return adoptRef(*new Network1BackendDispatcher(backendDispatcher, agent)); 241 242 } 242 243 … … 323 324 324 325 #include "InspectorProtocolObjects.h" 325 #include <inspector/InspectorFrontendChannel.h>326 326 #include <inspector/InspectorValues.h> 327 327 #include <wtf/text/WTFString.h> … … 329 329 namespace Inspector { 330 330 331 331 class FrontendRouter; 332 332 333 333 #if PLATFORM(WEB_EVENTS) 334 334 class Network3FrontendDispatcher { 335 335 public: 336 Network3FrontendDispatcher(Frontend Channel* frontendChannel) : m_frontendChannel(frontendChannel) { }336 Network3FrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } 337 337 void resourceLoaded(); 338 338 private: 339 Frontend Channel* m_frontendChannel;339 FrontendRouter& m_frontendRouter; 340 340 }; 341 341 #endif // PLATFORM(WEB_EVENTS) … … 380 380 #include "InspectorFrontendDispatchers.h" 381 381 382 #include "InspectorFrontendRouter.h" 382 383 #include <wtf/text/CString.h> 383 384 … … 390 391 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded")); 391 392 392 m_frontend Channel->sendMessageToFrontend(jsonMessage->toJSONString());393 m_frontendRouter.sendEvent(jsonMessage->toJSONString()); 393 394 } 394 395 #endif // PLATFORM(WEB_EVENTS) … … 725 726 726 727 auto alternateDispatcher = std::make_unique<ObjCInspectorNetwork1BackendDispatcher>(handler); 727 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), WTF::move(alternateDispatcher));728 auto alternateAgent = std::make_unique<AlternateDispatchableAgent<Network1BackendDispatcher, AlternateNetwork1BackendDispatcher>>(ASCIILiteral("Network1"), *_controller, WTF::move(alternateDispatcher)); 728 729 _controller->appendExtraAgent(WTF::move(alternateAgent)); 729 730 } … … 777 778 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 778 779 779 #import "RWIProtocol.h"780 #import <WebInspector/RWIProtocol.h> 780 781 781 782 __attribute__((visibility ("default"))) … … 824 825 #include "RWIProtocolInternal.h" 825 826 #include "RWIProtocolEnumConversionHelpers.h" 826 #include <JavaScriptCore/InspectorFrontendChannel.h>827 827 #include <JavaScriptCore/InspectorValues.h> 828 828 … … 937 937 938 938 #import "RWIProtocolEnumConversionHelpers.h" 939 #import <JavaScriptCore/InspectorFrontendChannel.h>940 939 #import <JavaScriptCore/InspectorValues.h> 941 940 … … 963 962 - (void)resourceLoaded 964 963 { 965 FrontendChannel* frontendChannel = _controller->frontendChannel(); 966 if (!frontendChannel) 967 return; 964 const FrontendRouter& router = _controller->frontendRouter(); 968 965 969 966 Ref<InspectorObject> jsonMessage = InspectorObject::create(); 970 967 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Network3.resourceLoaded")); 971 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());968 router.sendEvent(jsonMessage->toJSONString()); 972 969 } 973 970 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/same-type-id-different-domain.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 173 174 #include "InspectorBackendDispatchers.h" 174 175 175 #include <inspector/InspectorFrontend Channel.h>176 #include <inspector/InspectorFrontendRouter.h> 176 177 #include <inspector/InspectorValues.h> 177 178 #include <wtf/NeverDestroyed.h> … … 225 226 226 227 #include "InspectorProtocolObjects.h" 227 #include <inspector/InspectorFrontendChannel.h>228 228 #include <inspector/InspectorValues.h> 229 229 #include <wtf/text/WTFString.h> … … 231 231 namespace Inspector { 232 232 233 233 class FrontendRouter; 234 234 235 235 } // namespace Inspector … … 272 272 #include "InspectorFrontendDispatchers.h" 273 273 274 #include "InspectorFrontendRouter.h" 274 275 #include <wtf/text/CString.h> 275 276 … … 554 555 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 555 556 556 #import "RWIProtocol.h"557 #import <WebInspector/RWIProtocol.h> 557 558 558 559 __attribute__((visibility ("default"))) … … 599 600 #include "RWIProtocolInternal.h" 600 601 #include "RWIProtocolEnumConversionHelpers.h" 601 #include <JavaScriptCore/InspectorFrontendChannel.h>602 602 #include <JavaScriptCore/InspectorValues.h> 603 603 … … 693 693 694 694 #import "RWIProtocolEnumConversionHelpers.h" 695 #import <JavaScriptCore/InspectorFrontendChannel.h>696 695 #import <JavaScriptCore/InspectorValues.h> 697 696 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 173 174 #include "InspectorBackendDispatchers.h" 174 175 175 #include <inspector/InspectorFrontend Channel.h>176 #include <inspector/InspectorFrontendRouter.h> 176 177 #include <inspector/InspectorValues.h> 177 178 #include <wtf/NeverDestroyed.h> … … 225 226 226 227 #include "InspectorProtocolObjects.h" 227 #include <inspector/InspectorFrontendChannel.h>228 228 #include <inspector/InspectorValues.h> 229 229 #include <wtf/text/WTFString.h> … … 231 231 namespace Inspector { 232 232 233 233 class FrontendRouter; 234 234 235 235 } // namespace Inspector … … 272 272 #include "InspectorFrontendDispatchers.h" 273 273 274 #include "InspectorFrontendRouter.h" 274 275 #include <wtf/text/CString.h> 275 276 … … 625 626 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 626 627 627 #import "RWIProtocol.h"628 #import <WebInspector/RWIProtocol.h> 628 629 629 630 __attribute__((visibility ("default"))) … … 670 671 #include "RWIProtocolInternal.h" 671 672 #include "RWIProtocolEnumConversionHelpers.h" 672 #include <JavaScriptCore/InspectorFrontendChannel.h>673 673 #include <JavaScriptCore/InspectorValues.h> 674 674 … … 784 784 785 785 #import "RWIProtocolEnumConversionHelpers.h" 786 #import <JavaScriptCore/InspectorFrontendChannel.h>787 786 #import <JavaScriptCore/InspectorValues.h> 788 787 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 173 174 #include "InspectorBackendDispatchers.h" 174 175 175 #include <inspector/InspectorFrontend Channel.h>176 #include <inspector/InspectorFrontendRouter.h> 176 177 #include <inspector/InspectorValues.h> 177 178 #include <wtf/NeverDestroyed.h> … … 225 226 226 227 #include "InspectorProtocolObjects.h" 227 #include <inspector/InspectorFrontendChannel.h>228 228 #include <inspector/InspectorValues.h> 229 229 #include <wtf/text/WTFString.h> … … 231 231 namespace Inspector { 232 232 233 233 class FrontendRouter; 234 234 235 235 } // namespace Inspector … … 272 272 #include "InspectorFrontendDispatchers.h" 273 273 274 #include "InspectorFrontendRouter.h" 274 275 #include <wtf/text/CString.h> 275 276 … … 547 548 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 548 549 549 #import "RWIProtocol.h"550 #import <WebInspector/RWIProtocol.h> 550 551 551 552 __attribute__((visibility ("default"))) … … 592 593 #include "RWIProtocolInternal.h" 593 594 #include "RWIProtocolEnumConversionHelpers.h" 594 #include <JavaScriptCore/InspectorFrontendChannel.h>595 595 #include <JavaScriptCore/InspectorValues.h> 596 596 … … 682 682 683 683 #import "RWIProtocolEnumConversionHelpers.h" 684 #import <JavaScriptCore/InspectorFrontendChannel.h>685 684 #import <JavaScriptCore/InspectorValues.h> 686 685 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-array-type.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 176 177 #include "InspectorBackendDispatchers.h" 177 178 178 #include <inspector/InspectorFrontend Channel.h>179 #include <inspector/InspectorFrontendRouter.h> 179 180 #include <inspector/InspectorValues.h> 180 181 #include <wtf/NeverDestroyed.h> … … 228 229 229 230 #include "InspectorProtocolObjects.h" 230 #include <inspector/InspectorFrontendChannel.h>231 231 #include <inspector/InspectorValues.h> 232 232 #include <wtf/text/WTFString.h> … … 234 234 namespace Inspector { 235 235 236 236 class FrontendRouter; 237 237 238 238 } // namespace Inspector … … 275 275 #include "InspectorFrontendDispatchers.h" 276 276 277 #include "InspectorFrontendRouter.h" 277 278 #include <wtf/text/CString.h> 278 279 … … 577 578 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 578 579 579 #import "RWIProtocol.h"580 #import <WebInspector/RWIProtocol.h> 580 581 581 582 __attribute__((visibility ("default"))) … … 622 623 #include "RWIProtocolInternal.h" 623 624 #include "RWIProtocolEnumConversionHelpers.h" 624 #include <JavaScriptCore/InspectorFrontendChannel.h>625 625 #include <JavaScriptCore/InspectorValues.h> 626 626 … … 740 740 741 741 #import "RWIProtocolEnumConversionHelpers.h" 742 #import <JavaScriptCore/InspectorFrontendChannel.h>743 742 #import <JavaScriptCore/InspectorValues.h> 744 743 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-enum-type.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 177 178 #include "InspectorBackendDispatchers.h" 178 179 179 #include <inspector/InspectorFrontend Channel.h>180 #include <inspector/InspectorFrontendRouter.h> 180 181 #include <inspector/InspectorValues.h> 181 182 #include <wtf/NeverDestroyed.h> … … 229 230 230 231 #include "InspectorProtocolObjects.h" 231 #include <inspector/InspectorFrontendChannel.h>232 232 #include <inspector/InspectorValues.h> 233 233 #include <wtf/text/WTFString.h> … … 235 235 namespace Inspector { 236 236 237 237 class FrontendRouter; 238 238 239 239 } // namespace Inspector … … 276 276 #include "InspectorFrontendDispatchers.h" 277 277 278 #include "InspectorFrontendRouter.h" 278 279 #include <wtf/text/CString.h> 279 280 … … 576 577 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 577 578 578 #import "RWIProtocol.h"579 #import <WebInspector/RWIProtocol.h> 579 580 580 581 __attribute__((visibility ("default"))) … … 621 622 #include "RWIProtocolInternal.h" 622 623 #include "RWIProtocolEnumConversionHelpers.h" 623 #include <JavaScriptCore/InspectorFrontendChannel.h>624 624 #include <JavaScriptCore/InspectorValues.h> 625 625 … … 768 768 769 769 #import "RWIProtocolEnumConversionHelpers.h" 770 #import <JavaScriptCore/InspectorFrontendChannel.h>771 770 #import <JavaScriptCore/InspectorValues.h> 772 771 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 173 174 #include "InspectorBackendDispatchers.h" 174 175 175 #include <inspector/InspectorFrontend Channel.h>176 #include <inspector/InspectorFrontendRouter.h> 176 177 #include <inspector/InspectorValues.h> 177 178 #include <wtf/NeverDestroyed.h> … … 225 226 226 227 #include "InspectorProtocolObjects.h" 227 #include <inspector/InspectorFrontendChannel.h>228 228 #include <inspector/InspectorValues.h> 229 229 #include <wtf/text/WTFString.h> … … 231 231 namespace Inspector { 232 232 233 233 class FrontendRouter; 234 234 235 235 } // namespace Inspector … … 272 272 #include "InspectorFrontendDispatchers.h" 273 273 274 #include "InspectorFrontendRouter.h" 274 275 #include <wtf/text/CString.h> 275 276 … … 1014 1015 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 1015 1016 1016 #import "RWIProtocol.h"1017 #import <WebInspector/RWIProtocol.h> 1017 1018 1018 1019 __attribute__((visibility ("default"))) … … 1059 1060 #include "RWIProtocolInternal.h" 1060 1061 #include "RWIProtocolEnumConversionHelpers.h" 1061 #include <JavaScriptCore/InspectorFrontendChannel.h>1062 1062 #include <JavaScriptCore/InspectorValues.h> 1063 1063 … … 1153 1153 1154 1154 #import "RWIProtocolEnumConversionHelpers.h" 1155 #import <JavaScriptCore/InspectorFrontendChannel.h>1156 1155 #import <JavaScriptCore/InspectorValues.h> 1157 1156 -
trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result
r188965 r190905 36 36 37 37 #include "InspectorProtocolTypes.h" 38 #include <inspector/InspectorFrontendRouter.h> 38 39 #include <JavaScriptCore/InspectorBackendDispatcher.h> 39 40 … … 177 178 #include "InspectorBackendDispatchers.h" 178 179 179 #include <inspector/InspectorFrontend Channel.h>180 #include <inspector/InspectorFrontendRouter.h> 180 181 #include <inspector/InspectorValues.h> 181 182 #include <wtf/NeverDestroyed.h> … … 229 230 230 231 #include "InspectorProtocolObjects.h" 231 #include <inspector/InspectorFrontendChannel.h>232 232 #include <inspector/InspectorValues.h> 233 233 #include <wtf/text/WTFString.h> … … 235 235 namespace Inspector { 236 236 237 237 class FrontendRouter; 238 238 239 239 } // namespace Inspector … … 276 276 #include "InspectorFrontendDispatchers.h" 277 277 278 #include "InspectorFrontendRouter.h" 278 279 #include <wtf/text/CString.h> 279 280 … … 903 904 // by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py 904 905 905 #import "RWIProtocol.h"906 #import <WebInspector/RWIProtocol.h> 906 907 907 908 __attribute__((visibility ("default"))) … … 948 949 #include "RWIProtocolInternal.h" 949 950 #include "RWIProtocolEnumConversionHelpers.h" 950 #include <JavaScriptCore/InspectorFrontendChannel.h>951 951 #include <JavaScriptCore/InspectorValues.h> 952 952 … … 1095 1095 1096 1096 #import "RWIProtocolEnumConversionHelpers.h" 1097 #import <JavaScriptCore/InspectorFrontendChannel.h>1098 1097 #import <JavaScriptCore/InspectorValues.h> 1099 1098
Note: See TracChangeset
for help on using the changeset viewer.