Bug 192719

Summary: Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, hi, inspector-bugzilla-changes, rniwa, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=196231
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews105 for mac-highsierra-wk2
none
Archive of layout-test-results from ews117 for mac-highsierra
none
Patch
none
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Patch none

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 EWS Watchlist 2019-03-16 03:05:37 PDT Comment hidden (obsolete)
Comment 4 EWS Watchlist 2019-03-16 03:05:39 PDT Comment hidden (obsolete)
Comment 5 EWS Watchlist 2019-03-16 03:18:26 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2019-03-16 03:18:28 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2019-03-16 03:49:04 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 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 EWS Watchlist 2019-03-16 19:00:01 PDT Comment hidden (obsolete)
Comment 11 EWS Watchlist 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.