04af619b94
https://bugs.webkit.org/show_bug.cgi?id=218141 <rdar://problem/70636727> Reviewed by Brian Burg. Source/JavaScriptCore: * debugger/Debugger.h: (JSC::Debugger::Client::scopeExtensionObject): Added. * debugger/Debugger.cpp: (JSC::Debugger::setClient): Added. (JSC::Debugger::evaluateBreakpointCondition): (JSC::Debugger::evaluateBreakpointActions): Introduce an optional `Debugger::Client` virtual class that can be used to adjust behavior in various situations. Right now it is used when evaluating breakpoint conditions/actions to get a scope extension object. * inspector/agents/InspectorDebuggerAgent.h: * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::internalEnable): (Inspector::InspectorDebuggerAgent::internalDisable): (Inspector::InspectorDebuggerAgent::scopeExtensionObject): Added. Implement `Debugger::Client` and provide a newly created `CommandLineAPI` instance. * inspector/InjectedScript.h: * inspector/InjectedScript.cpp: (Inspector::InjectedScript::createCommandLineAPIObject const): Added. * inspector/InjectedScriptSource.js: (let.InjectedScript.prototype.createCommandLineAPIObject): Added. (let.InjectedScript.prototype._evaluateOn): Expose a way for the C++ to create `CommandLineAPI` instances. Source/WebInspectorUI: * UserInterface/Controllers/CodeMirrorCompletionController.js: (WI.CodeMirrorCompletionController): (WI.CodeMirrorCompletionController.prototype.get mode): Added. (WI.CodeMirrorCompletionController.prototype.get delegate): Deleted. * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js: (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded): (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeEvent): Added. (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.shouldExposeException): Added. (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames): Introduce a `Mode` enum that can be fetched by completion providers to adjust functionality. * UserInterface/Views/BreakpointPopover.js: (WI.BreakpointPopover.appendContextMenuItems): (WI.BreakpointPopover.prototype.show): (WI.BreakpointPopover.prototype.breakpointActionViewCodeMirrorCompletionControllerMode): Added. (WI.BreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added. * UserInterface/Views/EventBreakpointPopover.js: (WI.EventBreakpointPopover.prototype.get codeMirrorCompletionControllerMode): Added. * UserInterface/Views/BreakpointActionView.js: (WI.BreakpointActionView.prototype._updateBody): Use a `Mode` that always exposes `$event`/`$exception` depending on the breakpoint type. * UserInterface/Views/ConsolePrompt.js: (WI.ConsolePrompt): Use a `Mode` that only exposes `$event`/`$exception` when paused for an event/exeption. * UserInterface/Views/ScopeChainDetailsSidebarPanel.js: (WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked): Use a `Mode` that always exposes `$event`/`$exception` since watch expressions track values over time, and may therefore not always have an `$event`/`$exception` set. * UserInterface/Views/TextEditor.js: (WI.TextEditor): Use the default `Mode` that never exposes `$event`/`$exception`. LayoutTests: * inspector/debugger/resources/breakpoint-options-utilities.js: * inspector/debugger/break-on-exception-expected.txt: * inspector/debugger/break-on-uncaught-exception-expected.txt: * inspector/debugger/setPauseOnAssertions-expected.txt: * inspector/debugger/setPauseOnDebuggerStatements-expected.txt: * inspector/debugger/setPauseOnMicrotasks-expected.txt: * inspector/dom-debugger/attribute-modified-style-expected.txt: * inspector/dom-debugger/dom-breakpoint-attribute-modified-expected.txt: * inspector/dom-debugger/dom-breakpoint-node-removed-ancestor-expected.txt: * inspector/dom-debugger/dom-breakpoint-node-removed-direct-expected.txt: * inspector/dom-debugger/dom-breakpoint-subtree-modified-add-expected.txt: * inspector/dom-debugger/dom-breakpoint-subtree-modified-remove-expected.txt: * inspector/dom-debugger/event-animation-frame-breakpoints-expected.txt: * inspector/dom-debugger/event-interval-breakpoints-expected.txt: * inspector/dom-debugger/event-listener-breakpoints-expected.txt: * inspector/dom-debugger/event-timeout-breakpoints-expected.txt: * inspector/dom-debugger/url-breakpoints-all-requests-expected.txt: * inspector/dom-debugger/url-breakpoints-containing-expected.txt: * inspector/dom-debugger/url-breakpoints-matching-expected.txt: Canonical link: https://commits.webkit.org/230914@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269023 268f45cc-cd09-0410-ab3c-d52691b4dbfc |
||
---|---|---|
.. | ||
assert.js | ||
async-stack-trace-test.js | ||
break-on-exception-tests.js | ||
breakpoint-options-utilities.js | ||
breakpoint.js | ||
column-breakpoints-1.js | ||
column-breakpoints-2.js | ||
condition-ignoreCount.js | ||
csp-exception-iframe.html | ||
exception.js | ||
exceptions.js | ||
file-with-syntax-error.js | ||
log-active-stack-trace.js | ||
log-pause-location.js | ||
mac-linebreaks.js | ||
mixed-linebreaks.js | ||
nested-calls.js | ||
pause-reasons.js | ||
paused-scopes.js | ||
scope.js | ||
script-for-breakpoint-actions.js | ||
stack-overflow.js | ||
tail-deleted-frames-this-value.js | ||
tail-recursion.js | ||
unix-linebreaks.js | ||
windows-linebreaks.js |