Bug 130701

Summary: Web Inspector: reduce per-protocol method function creation in InspectorBackend
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: Brian Burg <burg>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
none
address review comments none

Description BJ Burg 2014-03-24 16:23:25 PDT
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.
Comment 1 Radar WebKit Bug Importer 2014-03-24 16:24:05 PDT
<rdar://problem/16412894>
Comment 2 Brian Burg 2014-04-29 14:13:47 PDT
Created attachment 230415 [details]
the patch
Comment 3 Timothy Hatcher 2014-04-29 15:32:15 PDT
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.
Comment 4 Brian Burg 2014-04-29 17:54:37 PDT
Created attachment 230446 [details]
address review comments
Comment 5 WebKit Commit Bot 2014-04-29 22:52:32 PDT
Comment on attachment 230446 [details]
address review comments

Clearing flags on attachment: 230446

Committed r167984: <http://trac.webkit.org/changeset/167984>
Comment 6 WebKit Commit Bot 2014-04-29 22:52:36 PDT
All reviewed patches have been landed.  Closing bug.