Bug 192719 - Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
Summary: Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-14 15:12 PST by Devin Rousso
Modified: 2019-03-25 16:58 PDT (History)
7 users (show)

See Also:


Attachments
Patch (79.94 KB, patch)
2019-03-16 02:02 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-highsierra (2.46 MB, application/zip)
2019-03-16 03:05 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.75 MB, application/zip)
2019-03-16 03:18 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-highsierra (2.26 MB, application/zip)
2019-03-16 03:49 PDT, Build Bot
no flags Details
Patch (78.88 KB, patch)
2019-03-16 16:55 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.55 MB, application/zip)
2019-03-16 19:00 PDT, Build Bot
no flags Details
Patch (78.64 KB, patch)
2019-03-20 11:48 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2018-12-14 15:12:53 PST
Rather than having to `JSON.stringify` and `JSON.parse` each breakpoint in a giant list on `localStorage`, we can leverage IndexedDB to store breakpoints in a more "friendly" way.  Additionally, this would allow us to not have to re-serialize all breakpoints when saving an update to a single breakpoint.  The restoring process is already "async" (we purposely invoke a timeout so all agents have a chance to respond to the added breakpoints), so the async nature of IndexedDB probably won't be an issue.
Comment 1 Radar WebKit Bug Importer 2018-12-14 16:59:58 PST
<rdar://problem/46746857>
Comment 2 Devin Rousso 2019-03-16 02:02:01 PDT
Created attachment 364924 [details]
Patch
Comment 3 Build Bot 2019-03-16 03:05:37 PDT Comment hidden (obsolete)
Comment 4 Build Bot 2019-03-16 03:05:39 PDT Comment hidden (obsolete)
Comment 5 Build Bot 2019-03-16 03:18:26 PDT Comment hidden (obsolete)
Comment 6 Build Bot 2019-03-16 03:18:28 PDT Comment hidden (obsolete)
Comment 7 Build Bot 2019-03-16 03:49:04 PDT Comment hidden (obsolete)
Comment 8 Build Bot 2019-03-16 03:49:05 PDT Comment hidden (obsolete)
Comment 9 Devin Rousso 2019-03-16 16:55:13 PDT
Created attachment 364948 [details]
Patch
Comment 10 Build Bot 2019-03-16 19:00:01 PDT Comment hidden (obsolete)
Comment 11 Build Bot 2019-03-16 19:00:03 PDT Comment hidden (obsolete)
Comment 12 Timothy Hatcher 2019-03-20 08:52:01 PDT
Comment on attachment 364948 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=364948&action=review

> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:224
> +        type = type || WI.BreakpointAction.Type.Log;

Why do this?

> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:292
> +    serializeOptions()

serializableOptions?
Comment 13 Devin Rousso 2019-03-20 11:47:00 PDT
Comment on attachment 364948 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=364948&action=review

>> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:224
>> +        type = type || WI.BreakpointAction.Type.Log;
> 
> Why do this?

Since I removed `WI.Breakpoint.DefaultBreakpointActionType`.  I'll put this in the caller.

>> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:292
>> +    serializeOptions()
> 
> serializableOptions?

This matches the naming scheme of other `serialize*` functions (e.g. `WI.HeapSnapshot.prototype.serializeNode`).
Comment 14 Devin Rousso 2019-03-20 11:48:46 PDT
Created attachment 365372 [details]
Patch
Comment 15 WebKit Commit Bot 2019-03-20 12:50:26 PDT
Comment on attachment 365372 [details]
Patch

Clearing flags on attachment: 365372

Committed r243226: <https://trac.webkit.org/changeset/243226>
Comment 16 WebKit Commit Bot 2019-03-20 12:50:28 PDT
All reviewed patches have been landed.  Closing bug.