⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 273804 in webkit


Ignore:
Timestamp:
Mar 2, 2021, 7:09:26 PM (6 years ago)
Author:
Alan Coon
Message:

Cherry-pick r273751. rdar://problem/74953144

[Cocoa] REGRESSION(r272752): fix some internal builds that use WTFString::WTFString(NSString *)
​https://bugs.webkit.org/show_bug.cgi?id=222610
<rdar://74938249>

Unreviewed build fix.

Patch by BJ Burg <BJ Burg> on 2021-03-02

  • inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py: (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_implementation): Some builders seem to find the new version of the header (without the exported NSString constructor) whereas others don't find the new version (expecting the symbol to be exported), causing a linker error later on.

As a workaround, force usage of the CFStringRef constructor, which is always exported.

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/enum-values.json-result:
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result: Rebaseline generator test results.

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@273751 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612.1.5-branch/Source/JavaScriptCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/ChangeLog

    r273229 r273804  
     12021-03-02  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r273751. rdar://problem/74953144
     4
     5    [Cocoa] REGRESSION(r272752): fix some internal builds that use WTFString::WTFString(NSString *)
     6    https://bugs.webkit.org/show_bug.cgi?id=222610
     7    <rdar://74938249>
     8   
     9    Unreviewed build fix.
     10   
     11    Patch by BJ Burg <bburg@apple.com> on 2021-03-02
     12   
     13    * inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py:
     14    (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_implementation):
     15    Some builders seem to find the new version of the header (without the exported NSString constructor)
     16    whereas others don't find the new version (expecting the symbol to be exported), causing a linker error later on.
     17   
     18    As a workaround, force usage of the CFStringRef constructor, which is always exported.
     19   
     20    * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
     21    * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
     22    * inspector/scripts/tests/expected/enum-values.json-result:
     23    * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
     24    * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
     25    * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
     26    * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
     27    Rebaseline generator test results.
     28   
     29   
     30   
     31    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     32
     33    2021-03-02  BJ Burg  <bburg@apple.com>
     34
     35            [Cocoa] REGRESSION(r272752): fix some internal builds that use WTFString::WTFString(NSString *)
     36            https://bugs.webkit.org/show_bug.cgi?id=222610
     37            <rdar://74938249>
     38
     39            Unreviewed build fix.
     40
     41            * inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py:
     42            (ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_method_implementation):
     43            Some builders seem to find the new version of the header (without the exported NSString constructor)
     44            whereas others don't find the new version (expecting the symbol to be exported), causing a linker error later on.
     45
     46            As a workaround, force usage of the CFStringRef constructor, which is always exported.
     47
     48            * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
     49            * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
     50            * inspector/scripts/tests/expected/enum-values.json-result:
     51            * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
     52            * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
     53            * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
     54            * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
     55            Rebaseline generator test results.
     56
    1572021-02-21  Lauro Moura  <lmoura@igalia.com>
    258
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py

    r262203 r273804  
    136136        if isinstance(resolved_type, EnumType):
    137137            lines.append('    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);')
    138             lines.append('    Optional<%(type)s> result = Inspector::fromProtocolString<%(type)s>(payload);' % {'type': self.objc_name_for_type(resolved_type)})
     138            lines.append('    Optional<%(type)s> result = Inspector::fromProtocolString<%(type)s>((__bridge CFStringRef)payload);' % {'type': self.objc_name_for_type(resolved_type)})
    139139            lines.append('    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"%s");' % declaration.type.raw_name())
    140140            lines.append('    *outValue = @(result.value());')
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result

    r272936 r273804  
    15971597{
    15981598    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    1599     Optional<TestProtocolDatabasePrimaryColors> result = Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>(payload);
     1599    Optional<TestProtocolDatabasePrimaryColors> result = Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>((__bridge CFStringRef)payload);
    16001600    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"PrimaryColors");
    16011601    *outValue = @(result.value());
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result

    r272936 r273804  
    14701470{
    14711471    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    1472     Optional<TestProtocolDatabasePrimaryColors> result = Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>(payload);
     1472    Optional<TestProtocolDatabasePrimaryColors> result = Inspector::fromProtocolString<TestProtocolDatabasePrimaryColors>((__bridge CFStringRef)payload);
    14731473    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"PrimaryColors");
    14741474    *outValue = @(result.value());
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result

    r272936 r273804  
    11681168{
    11691169    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    1170     Optional<TestProtocolTypeDomainEnum> result = Inspector::fromProtocolString<TestProtocolTypeDomainEnum>(payload);
     1170    Optional<TestProtocolTypeDomainEnum> result = Inspector::fromProtocolString<TestProtocolTypeDomainEnum>((__bridge CFStringRef)payload);
    11711171    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"Enum");
    11721172    *outValue = @(result.value());
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-array-type.json-result

    r272936 r273804  
    919919{
    920920    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    921     Optional<TestProtocolDebuggerReason> result = Inspector::fromProtocolString<TestProtocolDebuggerReason>(payload);
     921    Optional<TestProtocolDebuggerReason> result = Inspector::fromProtocolString<TestProtocolDebuggerReason>((__bridge CFStringRef)payload);
    922922    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"Reason");
    923923    *outValue = @(result.value());
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-enum-type.json-result

    r272936 r273804  
    963963{
    964964    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    965     Optional<TestProtocolRuntimeFarmAnimals> result = Inspector::fromProtocolString<TestProtocolRuntimeFarmAnimals>(payload);
     965    Optional<TestProtocolRuntimeFarmAnimals> result = Inspector::fromProtocolString<TestProtocolRuntimeFarmAnimals>((__bridge CFStringRef)payload);
    966966    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"FarmAnimals");
    967967    *outValue = @(result.value());
    … …  
    971971{
    972972    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    973     Optional<TestProtocolRuntimeTwoLeggedAnimals> result = Inspector::fromProtocolString<TestProtocolRuntimeTwoLeggedAnimals>(payload);
     973    Optional<TestProtocolRuntimeTwoLeggedAnimals> result = Inspector::fromProtocolString<TestProtocolRuntimeTwoLeggedAnimals>((__bridge CFStringRef)payload);
    974974    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"TwoLeggedAnimals");
    975975    *outValue = @(result.value());
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result

    r272936 r273804  
    17051705{
    17061706    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    1707     Optional<TestProtocolDatabaseMouseButton> result = Inspector::fromProtocolString<TestProtocolDatabaseMouseButton>(payload);
     1707    Optional<TestProtocolDatabaseMouseButton> result = Inspector::fromProtocolString<TestProtocolDatabaseMouseButton>((__bridge CFStringRef)payload);
    17081708    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"MouseButton");
    17091709    *outValue = @(result.value());
  • branches/safari-612.1.5-branch/Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result

    r272936 r273804  
    13261326{
    13271327    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    1328     Optional<TestProtocolTestUncastedAnimals> result = Inspector::fromProtocolString<TestProtocolTestUncastedAnimals>(payload);
     1328    Optional<TestProtocolTestUncastedAnimals> result = Inspector::fromProtocolString<TestProtocolTestUncastedAnimals>((__bridge CFStringRef)payload);
    13291329    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"UncastedAnimals");
    13301330    *outValue = @(result.value());
    … …  
    13341334{
    13351335    THROW_EXCEPTION_FOR_BAD_TYPE(payload, [NSString class]);
    1336     Optional<TestProtocolTestCastedAnimals> result = Inspector::fromProtocolString<TestProtocolTestCastedAnimals>(payload);
     1336    Optional<TestProtocolTestCastedAnimals> result = Inspector::fromProtocolString<TestProtocolTestCastedAnimals>((__bridge CFStringRef)payload);
    13371337    THROW_EXCEPTION_FOR_BAD_ENUM_VALUE(result, @"CastedAnimals");
    13381338    *outValue = @(result.value());
Note: See TracChangeset for help on using the changeset viewer.