Bug 130701 - Web Inspector: reduce per-protocol method function creation in InspectorBackend
Summary: Web Inspector: reduce per-protocol method function creation in InspectorBackend
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brian Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-24 16:23 PDT by BJ Burg
Modified: 2014-04-29 22:52 PDT (History)
6 users (show)

See Also:


Attachments
the patch (12.33 KB, patch)
2014-04-29 14:13 PDT, Brian Burg
no flags Details | Formatted Diff | Diff
address review comments (12.12 KB, patch)
2014-04-29 17:54 PDT, Brian Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.