Bug 159991

Summary: Kill legacy valueToStringWithNullCheck() utility function
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, commit-queue, darin, dbates, esprehn+autocc, ggaren, gyuyoung.kim, kondapallykalyan, rniwa, sam, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2016-07-20 16:19:01 PDT
Kill legacy valueToStringWithNullCheck() utility function. Treating null as a null string is legacy behavior so drop this function so that people are not tempted to use it. We should be using either: 1. JSValue::toWTFString() for non-nullable DOMStrings 2. valueToStringWithUndefinedOrNullCheck() for nullable DOMStrings 3. valueToStringTreatingNullAsEmptyString() for strings with [TreatNullAs=EmptyString]
Attachments
Patch (4.30 KB, patch)
2016-07-20 16:26 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-07-20 16:26:46 PDT
Chris Dumez
Comment 2 2016-07-21 09:02:06 PDT
Comment on attachment 284165 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=284165&action=review > Source/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp:57 > + String locationValue = value.isNull() ? String() : value.toWTFString(&state); I maintained the previous behavior for this setter (treating null as the null String) even though this behavior is non-standard since the attribute is non-standard. It was never implemented in Firefox / IE and Chrome dropped it a while back after getting usage data showing this was barely used. I personally think we should try and drop this attribute as well but I did not want to do this in this patch.
Chris Dumez
Comment 3 2016-07-21 11:40:59 PDT
Comment on attachment 284165 [details] Patch Clearing flags on attachment: 284165 Committed r203516: <http://trac.webkit.org/changeset/203516>
Chris Dumez
Comment 4 2016-07-21 11:41:04 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.