Bug 217865

Summary: Web Inspector: REGRESSION(r266669): DOMBreakpoint.js:106:23: CONSOLE ASSERT ERROR domNode should not change once set
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 215795    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Devin Rousso 2020-10-16 20:11:51 PDT
.
Comment 1 Devin Rousso 2020-10-16 20:26:15 PDT
Created attachment 411649 [details]
Patch
Comment 2 EWS 2020-10-16 21:34:30 PDT
Committed r268634: <https://trac.webkit.org/changeset/268634>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411649 [details].
Comment 3 Radar WebKit Bug Importer 2020-10-16 21:35:17 PDT
<rdar://problem/70402343>
Comment 4 BJ Burg 2020-10-17 13:37:08 PDT
Comment on attachment 411649 [details]
Patch

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

> LayoutTests/inspector/unit-tests/utilities.html:16
> +            InspectorTest.expectEqual(xor(42, "test"), false, "xor should explicitly return false when both values are truthy.");

I would have expected a logical operator to return true or false, not false or anything. What is the use case for returning the value instead of converting it to boolean first?
Comment 5 Devin Rousso 2020-10-19 11:03:00 PDT
Comment on attachment 411649 [details]
Patch

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

>> LayoutTests/inspector/unit-tests/utilities.html:16
>> +            InspectorTest.expectEqual(xor(42, "test"), false, "xor should explicitly return false when both values are truthy.");
> 
> I would have expected a logical operator to return true or false, not false or anything. What is the use case for returning the value instead of converting it to boolean first?

This way it behaves like `||` and `&&` in JavaScript, where the actual value is used in the "positive" case instead of `true`.