Changeset 214853 in webkit


Ignore:
Timestamp:
Apr 3, 2017 4:11:25 PM (7 years ago)
Author:
Nikita Vasilyev
Message:

Web Inspector: WebSockets: Don't store binary frames in memory since they are never shown
https://bugs.webkit.org/show_bug.cgi?id=169649
<rdar://problem/31053069>

Reviewed by Brian Burg.

  • UserInterface/Models/WebSocketResource.js:

(WebInspector.WebSocketResource.prototype.addFrame):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r214847 r214853  
     12017-04-03  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: WebSockets: Don't store binary frames in memory since they are never shown
     4        https://bugs.webkit.org/show_bug.cgi?id=169649
     5        <rdar://problem/31053069>
     6
     7        Reviewed by Brian Burg.
     8
     9        * UserInterface/Models/WebSocketResource.js:
     10        (WebInspector.WebSocketResource.prototype.addFrame):
     11
    1122017-04-03  Devin Rousso  <webkit@devinrousso.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js

    r213666 r214853  
    6262    addFrame(data, isOutgoing, opcode, timestamp, elapsedTime)
    6363    {
    64         let frame = {data, isOutgoing, opcode, walltime: this._walltimeForWebSocketTimestamp(timestamp)};
     64        let frameData;
     65
     66        // Binary data is never shown in the UI, don't clog memory with it.
     67        if (opcode === WebInspector.WebSocketResource.OpCodes.BinaryFrame)
     68            frameData = null;
     69        else
     70            frameData = data;
     71
     72        let frame = {data: frameData, isOutgoing, opcode, walltime: this._walltimeForWebSocketTimestamp(timestamp)};
    6573        this._frames.push(frame);
    6674
Note: See TracChangeset for help on using the changeset viewer.