Bug 217241 - Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'breakpoint.disabled = true')
Summary: Web Inspector: Uncaught Exception: TypeError: undefined is not an object (eva...
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: 2020-10-02 12:03 PDT by Devin Rousso
Modified: 2020-10-05 13:04 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.75 KB, patch)
2020-10-02 12:21 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 2020-10-02 12:03:14 PDT
# STEPS TO REPRODUCE
1. inspect any page with JS event listeners
2. uncheck the "Enabled" checkbox for any event listener on any node

Uncaught Exceptions:
-----------------------
 - TypeError: undefined is not an object (evaluating 'breakpoint.disabled = true') (at DOMManager.js:705:19)
    removeBreakpointForEventListener @ DOMManager.js:705:19
    hasEventListenerBreakpoint @ EventListenerSectionGroup.js:167:59
    ? @ EventListenerSectionGroup.js:62:25
Comment 1 Devin Rousso 2020-10-02 12:21:42 PDT
Created attachment 410351 [details]
Patch
Comment 2 Kate Cheney 2020-10-05 09:02:02 PDT
Comment on attachment 410351 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:-701
> -                target.DOMAgent.removeBreakpointForEventListener(eventListener.eventListenerId);

Why remove this call?
Comment 3 Devin Rousso 2020-10-05 10:56:46 PDT
Comment on attachment 410351 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:-701
>> -                target.DOMAgent.removeBreakpointForEventListener(eventListener.eventListenerId);
> 
> Why remove this call?

this is done later inside `_handleEventBreakpointDisabledStateChanged` (which is an event listener callback for `WI.Breakpoint.Event.DisabledStateDidChange`, which is dispatched by `WI.Breakpoint.prototype.set disabled`)
Comment 4 Kate Cheney 2020-10-05 11:05:17 PDT
(In reply to Devin Rousso from comment #3)
> Comment on attachment 410351 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=410351&action=review
> 
> >> Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:-701
> >> -                target.DOMAgent.removeBreakpointForEventListener(eventListener.eventListenerId);
> > 
> > Why remove this call?
> 
> this is done later inside `_handleEventBreakpointDisabledStateChanged`
> (which is an event listener callback for
> `WI.Breakpoint.Event.DisabledStateDidChange`, which is dispatched by
> `WI.Breakpoint.prototype.set disabled`)

Nice, thanks for explaining!
Comment 5 BJ Burg 2020-10-05 12:43:52 PDT
Comment on attachment 410351 [details]
Patch

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

r=e

>>>> Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js:-701
>>>> -                target.DOMAgent.removeBreakpointForEventListener(eventListener.eventListenerId);
>>> 
>>> Why remove this call?
>> 
>> this is done later inside `_handleEventBreakpointDisabledStateChanged` (which is an event listener callback for `WI.Breakpoint.Event.DisabledStateDidChange`, which is dispatched by `WI.Breakpoint.prototype.set disabled`)
> 
> Nice, thanks for explaining!

Would have been good to put this in the changelog :-)
Comment 6 BJ Burg 2020-10-05 12:44:02 PDT
r=me *
Comment 7 EWS 2020-10-05 13:03:10 PDT
Committed r267998: <https://trac.webkit.org/changeset/267998>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410351 [details].
Comment 8 Radar WebKit Bug Importer 2020-10-05 13:04:19 PDT
<rdar://problem/69967550>