We should be able to create a ProtocolMethod object to store method-specific signature, and stick .promise, .invoke, .supports on the prototype. This will save 3 * (number of protocol commands) function instances on startup.
<rdar://problem/16412894>
Created attachment 230415 [details] the patch
Comment on attachment 230415 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=230415&action=review > Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:246 > + var callable = function() { function callable() { > Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:248 > + }; No ; > Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:292 > + console.log("invoke args: ", args, "len: ", args.length); > + console.log("signature: ", JSON.stringify(instance._callSignature)); Debug? Or this.dumpInspectorProtocolMessages? > Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:295 > + console.log("callback:", callback); Ditto. > Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:310 > + console.log("processing arg " + i + ":", value); Ditto. > Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:313 > + if (optionalFlag && typeof value === "undefined") { > + continue; > + } No braces.
Created attachment 230446 [details] address review comments
Comment on attachment 230446 [details] address review comments Clearing flags on attachment: 230446 Committed r167984: <http://trac.webkit.org/changeset/167984>
All reviewed patches have been landed. Closing bug.