Changeset 262077 in webkit


Ignore:
Timestamp:
May 22, 2020 2:54:32 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Storage: don't request the list of IndexedDB database names multiple times for the same security origin
https://bugs.webkit.org/show_bug.cgi?id=212253
<rdar://problem/62945903>

Reviewed by Joseph Pecoraro.

This can happen if additional frames are added that share the same security origin as the
main frame. Simply maintain a Set of security origins that've already been requested for
and ignore any repeat requests.

  • UserInterface/Controllers/IndexedDBManager.js:

(WI.IndexedDBManager):
(WI.IndexedDBManager.prototype._reset):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r261962 r262077  
     12020-05-22  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Storage: don't request the list of IndexedDB database names multiple times for the same security origin
     4        https://bugs.webkit.org/show_bug.cgi?id=212253
     5        <rdar://problem/62945903>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        This can happen if additional frames are added that share the same security origin as the
     10        main frame. Simply maintain a `Set` of security origins that've already been requested for
     11        and ignore any repeat requests.
     12
     13        * UserInterface/Controllers/IndexedDBManager.js:
     14        (WI.IndexedDBManager):
     15        (WI.IndexedDBManager.prototype._reset):
     16
    1172020-05-20  Nikita Vasilyev  <nvasilyev@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/IndexedDBManager.js

    r251227 r262077  
    3434
    3535        this._enabled = false;
     36        this._requestedSecurityOrigins = new Set;
     37
    3638        this._reset();
    3739    }
     
    152154    {
    153155        this._indexedDatabases = [];
     156        this._requestedSecurityOrigins.clear();
    154157        this.dispatchEventToListeners(WI.IndexedDBManager.Event.Cleared);
    155158
     
    173176        if (!securityOrigin || securityOrigin === "://")
    174177            return;
     178
     179        if (this._requestedSecurityOrigins.has(securityOrigin))
     180            return;
     181
     182        this._requestedSecurityOrigins.add(securityOrigin);
    175183
    176184        function processDatabaseNames(error, names)
Note: See TracChangeset for help on using the changeset viewer.