Changeset 260515 in webkit


Ignore:
Timestamp:
Apr 22, 2020 9:22:38 AM (4 years ago)
Author:
sbarati@apple.com
Message:

makeValueRefForValue should be robust against the type encoding of a NSNumber backed by a boolean
https://bugs.webkit.org/show_bug.cgi?id=210821
<rdar://problem/62136598>

Reviewed by Tim Horton.

  • DumpRenderTree/mac/AccessibilityNotificationHandler.mm:

(makeValueRefForValue):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r260497 r260515  
     12020-04-22  Saam Barati  <sbarati@apple.com>
     2
     3        makeValueRefForValue should be robust against the type encoding of a NSNumber backed by a boolean
     4        https://bugs.webkit.org/show_bug.cgi?id=210821
     5        <rdar://problem/62136598>
     6
     7        Reviewed by Tim Horton.
     8
     9        * DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
     10        (makeValueRefForValue):
     11
    1122020-04-21  Ryan Haddad  <ryanhaddad@apple.com>
    213
  • trunk/Tools/DumpRenderTree/mac/AccessibilityNotificationHandler.mm

    r259843 r260515  
    107107        return JSValueMakeString(context, [value createJSStringRef].get());
    108108    if ([value isKindOfClass:[NSNumber class]]) {
    109         if (!strcmp([value objCType], @encode(BOOL)))
     109        if (!strcmp([value objCType], @encode(BOOL)) || !strcmp([value objCType], "c"))
    110110            return JSValueMakeBoolean(context, [value boolValue]);
    111111        return JSValueMakeNumber(context, [value doubleValue]);
Note: See TracChangeset for help on using the changeset viewer.