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

Changeset 280961 in webkit


Ignore:
Timestamp:
Aug 12, 2021, 4:43:55 AM (5 years ago)
Author:
youenn@apple.com
Message:

REGRESSION (r280726): [ Big Sur wk1 ] 25 imported/w3c/web-platform-tests/fetch/ failing
https://bugs.webkit.org/show_bug.cgi?id=228926
<rdar://problem/81715332>

Reviewed by Eric Carlson.

isFeatureFlagEnabled is called when creating/initializing WebPreferences.
It used to check for WebView, which triggers the execution of WebView initialize method
while DumpRenderTree is in the middle of creating its testing setup, including its storage testing sessions.
Instead, check for WebResource to remove this side effect and get back to past DumpRenderTree initialization.

  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::isFeatureFlagEnabled):

Location:
trunk/Source/WebKitLegacy/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r280957 r280961  
     12021-08-12  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r280726): [ Big Sur wk1 ] 25 imported/w3c/web-platform-tests/fetch/ failing
     4        https://bugs.webkit.org/show_bug.cgi?id=228926
     5        <rdar://problem/81715332>
     6
     7        Reviewed by Eric Carlson.
     8
     9        isFeatureFlagEnabled is called when creating/initializing WebPreferences.
     10        It used to check for WebView, which triggers the execution of WebView initialize method
     11        while DumpRenderTree is in the middle of creating its testing setup, including its storage testing sessions.
     12        Instead, check for WebResource to remove this side effect and get back to past DumpRenderTree initialization.
     13
     14        * WebView/WebPreferencesDefaultValues.mm:
     15        (WebKit::isFeatureFlagEnabled):
     16
    1172021-08-11  Peng Liu  <peng.liu6@apple.com>
    218
  • trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm

    r280957 r280961  
    5050#if HAVE(SYSTEM_FEATURE_FLAGS)
    5151
    52     // FIXME: On MacOS, we need to deal with the cases when system feature flags are not available.
    53     // But we need to fix <http://webkit.org/b/228926> first.
    54 #if PLATFORM(COCOA)
     52#if PLATFORM(MAC)
     53    static bool isSystemWebKit = [] {
     54        auto *bundle = [NSBundle bundleForClass:NSClassFromString(@"WebResource")];
     55        return [bundle.bundlePath hasPrefix:@"/System/"];
     56    }();
     57
     58    return isSystemWebKit ? _os_feature_enabled_impl("WebKit", featureName) : defaultValue;
     59#else
    5560    UNUSED_PARAM(defaultValue);
    5661    return _os_feature_enabled_impl("WebKit", featureName);
Note: See TracChangeset for help on using the changeset viewer.