RESOLVED FIXED 146466
Web Inspector: no need to allocate protocolErrors array for every dispatched backend command
https://bugs.webkit.org/show_bug.cgi?id=146466
Summary Web Inspector: no need to allocate protocolErrors array for every dispatched ...
Brian Burg
Reported 2015-06-30 12:29:14 PDT
This can be reused per domain dispatcher, removing one InspectorArray allocation per dispatched command in the normal case. While this is done, can also extract the code for getting the parameters object out of the payload into the dispatcher's main dispatch method. This removes more duplicated code from every generated command binding.
Attachments
Patch (no tests) (88.75 KB, patch)
2015-07-06 12:12 PDT, Brian Burg
no flags
Proposed Fix (104.85 KB, patch)
2015-08-25 11:50 PDT, Blaze Burg
no flags
Proposed Fix (fix linker) (105.05 KB, patch)
2015-08-25 15:19 PDT, Blaze Burg
no flags
Proposed Fix (EWS) (134.93 KB, patch)
2015-08-25 16:52 PDT, Blaze Burg
joepeck: review+
Radar WebKit Bug Importer
Comment 1 2015-06-30 12:30:00 PDT
Brian Burg
Comment 2 2015-07-06 12:12:58 PDT
Created attachment 256229 [details] Patch (no tests)
Brian Burg
Comment 3 2015-07-06 12:13:44 PDT
This patch makes some subtle changes to how errors are reported. I'd like to write a test to cover the existing error cases before landing this, so we have a clear idea of the behavior change.
Blaze Burg
Comment 4 2015-08-25 11:50:29 PDT
Created attachment 259866 [details] Proposed Fix
WebKit Commit Bot
Comment 5 2015-08-25 11:52:59 PDT
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)
Joseph Pecoraro
Comment 6 2015-08-25 12:18:50 PDT
Comment on attachment 259866 [details] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=259866&action=review Nice! Much cleaner > Source/JavaScriptCore/ChangeLog:67 > + * inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py: Duplicated in the changelog? > Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h:75 > + unsigned protocolErrorCount() const { return m_protocolErrors.size(); } This is only ever used alongside "> 0". Maybe it should just be `bool hasProtocolErrors()`?
Blaze Burg
Comment 7 2015-08-25 15:19:35 PDT
Created attachment 259889 [details] Proposed Fix (fix linker)
Blaze Burg
Comment 8 2015-08-25 16:52:20 PDT
Created attachment 259903 [details] Proposed Fix (EWS) Now includes fixes for ObjC generated code.
Joseph Pecoraro
Comment 9 2015-08-26 00:55:36 PDT
Comment on attachment 259903 [details] Proposed Fix (EWS) r=me
Blaze Burg
Comment 10 2015-08-26 07:34:54 PDT
Csaba Osztrogonác
Comment 11 2015-08-26 08:57:56 PDT
Brent Fulgham
Comment 12 2015-08-26 09:02:56 PDT
Interesting. Looks like a symbol isn't getting exported. Alex: I wonder if it's our old friend "the overly zealous symbol stripper".
Alex Christensen
Comment 13 2015-08-26 11:16:30 PDT
I deleted the WebKitBuild directory on my bot. I'm just going to close my eyes and hope this magically fixes it.
Note You need to log in before you can comment on or make changes to this bug.