Inspector does not restore breakpoints after a page reload
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Mar 2014 04:44:15 +0000 (04:44 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Mar 2014 04:44:15 +0000 (04:44 +0000)
commit873890582018ef3602ffafefab38556254d18f12
tree1e3cc61f44f24d188f982938733827b21dfff397
parent09db633f5fbae0e47190e5f5abcf95948cacac3c
Inspector does not restore breakpoints after a page reload
https://bugs.webkit.org/show_bug.cgi?id=129655

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Fix a regression introduced by r162096 that erroneously removed
the inspector backend's mapping of files to breakpoints whenever the
global object was cleared.

The inspector's breakpoint mappings should only be cleared when the
debugger agent is disabled or destroyed. We should only clear the
debugger's breakpoint state when the global object is cleared.

To make it clearer what state is being cleared, the two cases have
been split into separate methods.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::clearInspectorBreakpointState):
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
(Inspector::InspectorDebuggerAgent::didClearGlobalObject):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebInspectorUI:

Fix some console asserts that fire when breakpoints resolve.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointResolved):
This had a typo, it should be `breakpoint.identifier`.
(WebInspector.DebuggerManager.prototype.scriptDidParse):
Sometimes the `url` parameter is empty instead of null.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js