Changeset 265431 in webkit


Ignore:
Timestamp:
Aug 10, 2020 9:31:38 AM (4 years ago)
Author:
achristensen@apple.com
Message:

REGRESSION(r261159) PokerBros only shows black screen
https://bugs.webkit.org/show_bug.cgi?id=215293
<rdar://problem/66073740>

Reviewed by Keith Miller.

The PokerBros app has some logic that was broken by the change in behavior of r261159.
It caused the app do do nothing except show a black screen upon opening.
Revert to the old behavior for this app until they update to iOS14.

  • runtime/JSObject.cpp:

(JSC::needsOldStringName):
(JSC::JSObject::toStringName):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r265423 r265431  
     12020-08-10  Alex Christensen  <achristensen@webkit.org>
     2
     3        REGRESSION(r261159) PokerBros only shows black screen
     4        https://bugs.webkit.org/show_bug.cgi?id=215293
     5        <rdar://problem/66073740>
     6
     7        Reviewed by Keith Miller.
     8
     9        The PokerBros app has some logic that was broken by the change in behavior of r261159.
     10        It caused the app do do nothing except show a black screen upon opening.
     11        Revert to the old behavior for this app until they update to iOS14.
     12
     13        * runtime/JSObject.cpp:
     14        (JSC::needsOldStringName):
     15        (JSC::JSObject::toStringName):
     16
    1172020-08-10  Yusuke Suzuki  <ysuzuki@apple.com>
    218
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r265421 r265431  
    4444#include "VMInlines.h"
    4545#include <wtf/Assertions.h>
     46
     47#if PLATFORM(IOS)
     48#include <wtf/spi/darwin/dyldSPI.h>
     49#endif
    4650
    4751namespace JSC {
     
    510514}
    511515
     516#if PLATFORM(IOS)
     517inline static bool isPokerBros()
     518{
     519    auto bundleID = CFBundleGetIdentifier(CFBundleGetMainBundle());
     520    return bundleID
     521        && CFEqual(bundleID, CFSTR("com.kpgame.PokerBros"))
     522        && dyld_get_program_sdk_version() < DYLD_IOS_VERSION_14_0;
     523}
     524#endif
     525
    512526String JSObject::toStringName(const JSObject* object, JSGlobalObject* globalObject)
    513527{
    514528    VM& vm = globalObject->vm();
     529#if PLATFORM(IOS)
     530    static bool needsOldStringName = isPokerBros();
     531    if (UNLIKELY(needsOldStringName)) {
     532        const ClassInfo* info = object->classInfo(vm);
     533        ASSERT(info);
     534        return info->className;
     535    }
     536#endif
    515537    auto scope = DECLARE_THROW_SCOPE(vm);
    516538    bool objectIsArray = isArray(globalObject, object);
Note: See TracChangeset for help on using the changeset viewer.