Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 19:50:21 +0000 (19:50 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 19:50:21 +0000 (19:50 +0000)
commit6680e1abc25d7210a3e495ec7159a37f7428750c
tree618abe2f3615523c3a637f7ae19636c7aa00fb32
parent929621d4f34249fb94d56cef0479b3ef58878419
Web Inspector: Debugger: move breakpoint storage to use `WI.ObjectStore`
https://bugs.webkit.org/show_bug.cgi?id=192719
<rdar://problem/46746857>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype.removeBreakpoint):
(WI.DebuggerManager.prototype._debuggerBreakpointOptions):
(WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint):
(WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
(WI.DebuggerManager.prototype._saveBreakpoints): Deleted.

* UserInterface/Models/Breakpoint.js:
(WI.Breakpoint.prototype.saveIdentityToCookie):
(WI.Breakpoint.prototype.serializeOptions): Added.
(WI.Breakpoint.prototype.toJSON): Added.
(WI.Breakpoint.prototype.get options): Deleted.
(WI.Breakpoint.prototype.get info): Deleted.
(WI.Breakpoint.prototype._serializableActions): Deleted.
* UserInterface/Models/BreakpointAction.js:
(WI.BreakpointAction.prototype.toJSON): Added.
(WI.BreakpointAction.prototype.get info): Deleted.

* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore.async reset): Added.
(WI.ObjectStore._open):
(WI.ObjectStore.prototype.get keyPath): Added.
(WI.ObjectStore.prototype.async.getAll):
(WI.ObjectStore.prototype.async.put): Added.
(WI.ObjectStore.prototype.async.putObject): Added.
(WI.ObjectStore.prototype.async.add): Deleted.
(WI.ObjectStore.prototype.async.addObject): Deleted.
Replace `add` with `put` so that if a key already exists, it is overridden.

* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.set editing):
(WI.AuditManager.prototype.async processJSON):

* UserInterface/Controllers/BreakpointPopoverController.js:
(WI.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
Inline some `WI.Breakpoint` static values.

LayoutTests:

* inspector/unit-tests/objectStore/resources/objectStore-utilities.js:
* inspector/unit-tests/objectStore/put.html: Renamed from LayoutTests/inspector/unit-tests/objectStore/add.html.
* inspector/unit-tests/objectStore/put-expected.txt: Renamed from LayoutTests/inspector/unit-tests/objectStore/add-expected.txt.
* inspector/unit-tests/objectStore/putObject.html: Renamed from LayoutTests/inspector/unit-tests/objectStore/addObject.html.
* inspector/unit-tests/objectStore/putObject-expected.txt: Renamed from LayoutTests/inspector/unit-tests/objectStore/addObject-expected.txt.
* inspector/unit-tests/objectStore/delete-expected.txt:
* inspector/unit-tests/objectStore/delete.html:
* inspector/unit-tests/objectStore/deleteObject-expected.txt:
* inspector/unit-tests/objectStore/deleteObject.html:
* inspector/unit-tests/objectStore/clear.html:
Replace `add` with `put` so that if a key already exists, it is overridden.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/unit-tests/objectStore/add-expected.txt [deleted file]
LayoutTests/inspector/unit-tests/objectStore/clear.html
LayoutTests/inspector/unit-tests/objectStore/delete-expected.txt
LayoutTests/inspector/unit-tests/objectStore/delete.html
LayoutTests/inspector/unit-tests/objectStore/deleteObject-expected.txt
LayoutTests/inspector/unit-tests/objectStore/deleteObject.html
LayoutTests/inspector/unit-tests/objectStore/put-expected.txt [new file with mode: 0644]
LayoutTests/inspector/unit-tests/objectStore/put.html [moved from LayoutTests/inspector/unit-tests/objectStore/add.html with 76% similarity]
LayoutTests/inspector/unit-tests/objectStore/putObject-expected.txt [moved from LayoutTests/inspector/unit-tests/objectStore/addObject-expected.txt with 54% similarity]
LayoutTests/inspector/unit-tests/objectStore/putObject.html [moved from LayoutTests/inspector/unit-tests/objectStore/addObject.html with 78% similarity]
LayoutTests/inspector/unit-tests/objectStore/resources/objectStore-utilities.js
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/ObjectStore.js
Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js
Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js
Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js
Source/WebInspectorUI/UserInterface/Models/Breakpoint.js
Source/WebInspectorUI/UserInterface/Models/BreakpointAction.js