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

Changeset 273777 in webkit


Ignore:
Timestamp:
Mar 2, 2021, 5:37:34 PM (6 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Remove ImpureProxyType
​https://bugs.webkit.org/show_bug.cgi?id=222626

Reviewed by Alexey Shvayka.

Source/JavaScriptCore:

ImpureProxyType is no longer used. This patch just removes it.

  • API/tests/JSObjectGetProxyTargetTest.cpp:

(testJSObjectGetProxyTarget):

  • runtime/HasOwnPropertyCache.h:

(JSC::HasOwnPropertyCache::tryAdd):

  • runtime/JSCast.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::isProxy const):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::finishCreation):

  • runtime/JSProxy.h:

(JSC::JSProxy::createStructure):

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/Structure.h:

(JSC::Structure::isProxy const):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

Source/WebCore:

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::initScriptWithSubclass):

Location:
trunk/Source
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/tests/JSObjectGetProxyTargetTest.cpp

    r261755 r273777  
    6161        JSProxy* globalObjectProxyObject = jsCast<JSProxy*>(toJS(globalObjectProxy));
    6262        globalObjectObject = jsCast<JSGlobalObject*>(globalObjectProxyObject->target());
    63         Structure* proxyStructure = JSProxy::createStructure(vm, globalObjectObject, globalObjectObject->objectPrototype(), PureForwardingProxyType);
     63        Structure* proxyStructure = JSProxy::createStructure(vm, globalObjectObject, globalObjectObject->objectPrototype());
    6464        globalObjectRef = toRef(jsCast<JSObject*>(globalObjectObject));
    6565        jsProxyObject = JSProxy::create(vm, proxyStructure);
  • trunk/Source/JavaScriptCore/ChangeLog

    r273768 r273777  
     12021-03-02  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Remove ImpureProxyType
     4        https://bugs.webkit.org/show_bug.cgi?id=222626
     5
     6        Reviewed by Alexey Shvayka.
     7
     8        ImpureProxyType is no longer used. This patch just removes it.
     9
     10        * API/tests/JSObjectGetProxyTargetTest.cpp:
     11        (testJSObjectGetProxyTarget):
     12        * runtime/HasOwnPropertyCache.h:
     13        (JSC::HasOwnPropertyCache::tryAdd):
     14        * runtime/JSCast.h:
     15        * runtime/JSCellInlines.h:
     16        (JSC::JSCell::isProxy const):
     17        * runtime/JSGlobalObject.cpp:
     18        (JSC::JSGlobalObject::resetPrototype):
     19        (JSC::JSGlobalObject::finishCreation):
     20        * runtime/JSProxy.h:
     21        (JSC::JSProxy::createStructure):
     22        * runtime/JSType.cpp:
     23        (WTF::printInternal):
     24        * runtime/JSType.h:
     25        * runtime/Structure.h:
     26        (JSC::Structure::isProxy const):
     27        * tools/JSDollarVM.cpp:
     28        (JSC::JSC_DEFINE_HOST_FUNCTION):
     29
    1302021-03-02  Saam Barati  <sbarati@apple.com>
    231
  • trunk/Source/JavaScriptCore/runtime/HasOwnPropertyCache.h

    r239427 r273777  
    8888            return;
    8989
    90         if (object->type() == PureForwardingProxyType || object->type() == ImpureProxyType)
     90        if (object->type() == PureForwardingProxyType)
    9191            return;
    9292
  • trunk/Source/JavaScriptCore/runtime/JSCast.h

    r273766 r273777  
    8080    macro(JSArrayBufferView, FirstTypedArrayType, LastTypedArrayType) \
    8181    macro(JSPromise, JSType::JSPromiseType, JSType::JSPromiseType) \
    82     macro(JSProxy, JSType::PureForwardingProxyType, JSType::ImpureProxyType) \
     82    macro(JSProxy, JSType::PureForwardingProxyType, JSType::PureForwardingProxyType) \
    8383    macro(JSSet, JSType::JSSetType, JSType::JSSetType) \
    8484    macro(JSMap, JSType::JSMapType, JSType::JSMapType) \
  • trunk/Source/JavaScriptCore/runtime/JSCellInlines.h

    r273138 r273777  
    245245inline bool JSCell::isProxy() const
    246246{
    247     return m_type == ImpureProxyType || m_type == PureForwardingProxyType || m_type == ProxyObjectType;
     247    return m_type == PureForwardingProxyType || m_type == ProxyObjectType;
    248248}
    249249
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r273718 r273777  
    19041904    fixupPrototypeChainWithObjectPrototype(vm);
    19051905    // Whenever we change the prototype of the global object, we need to create a new JSProxy with the correct prototype.
    1906     setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype, PureForwardingProxyType), this));
     1906    setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype), this));
    19071907}
    19081908
    … …  
    23772377    m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);
    23782378    init(vm);
    2379     setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, getPrototypeDirect(vm), PureForwardingProxyType), this));
     2379    setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, getPrototypeDirect(vm)), this));
    23802380    ASSERT(type() == GlobalObjectType);
    23812381}
  • trunk/Source/JavaScriptCore/runtime/JSProxy.h

    r273766 r273777  
    5656    }
    5757
    58     static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype, JSType proxyType)
     58    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
    5959    {
    60         ASSERT(proxyType == ImpureProxyType || proxyType == PureForwardingProxyType);
    61         return Structure::create(vm, globalObject, prototype, TypeInfo(proxyType, StructureFlags), info());
     60        return Structure::create(vm, globalObject, prototype, TypeInfo(PureForwardingProxyType, StructureFlags), info());
    6261    }
    6362
  • trunk/Source/JavaScriptCore/runtime/JSType.cpp

    r272170 r273777  
    6969    CASE(ErrorInstanceType)
    7070    CASE(PureForwardingProxyType)
    71     CASE(ImpureProxyType)
    7271    CASE(DirectArgumentsType)
    7372    CASE(ScopedArgumentsType)
  • trunk/Source/JavaScriptCore/runtime/JSType.h

    r272170 r273777  
    6666    ErrorInstanceType,
    6767    PureForwardingProxyType,
    68     ImpureProxyType,
    6968    DirectArgumentsType,
    7069    ScopedArgumentsType,
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r273138 r273777  
    184184    {
    185185        JSType type = m_blob.type();
    186         return type == ImpureProxyType || type == PureForwardingProxyType || type == ProxyObjectType;
     186        return type == PureForwardingProxyType || type == ProxyObjectType;
    187187    }
    188188
  • trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp

    r273138 r273777  
    27162716        return JSValue::encode(jsUndefined());
    27172717    JSObject* jsTarget = asObject(target.asCell());
    2718     Structure* structure = JSProxy::createStructure(vm, globalObject, jsTarget->getPrototypeDirect(vm), ImpureProxyType);
     2718    Structure* structure = JSProxy::createStructure(vm, globalObject, jsTarget->getPrototypeDirect(vm));
    27192719    JSProxy* proxy = JSProxy::create(vm, structure, jsTarget);
    27202720    return JSValue::encode(proxy);
  • trunk/Source/WebCore/ChangeLog

    r273776 r273777  
     12021-03-02  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Remove ImpureProxyType
     4        https://bugs.webkit.org/show_bug.cgi?id=222626
     5
     6        Reviewed by Alexey Shvayka.
     7
     8        * workers/WorkerOrWorkletScriptController.cpp:
     9        (WebCore::WorkerOrWorkletScriptController::initScriptWithSubclass):
     10
    1112021-03-02  Sam Weinig  <weinig@apple.com>
    212
  • trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp

    r273299 r273777  
    489489    auto* contextPrototype = JSGlobalScopePrototype::create(*m_vm, nullptr, contextPrototypeStructure);
    490490    Structure* structure = JSGlobalScope::createStructure(*m_vm, nullptr, contextPrototype);
    491     auto* proxyStructure = JSProxy::createStructure(*m_vm, nullptr, jsNull(), PureForwardingProxyType);
     491    auto* proxyStructure = JSProxy::createStructure(*m_vm, nullptr, jsNull());
    492492    auto* proxy = JSProxy::create(*m_vm, proxyStructure);
    493493
Note: See TracChangeset for help on using the changeset viewer.