Changeset 273777 in webkit
- Timestamp:
- Mar 2, 2021, 5:37:34 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
-
JavaScriptCore/API/tests/JSObjectGetProxyTargetTest.cpp (modified) (1 diff)
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/runtime/HasOwnPropertyCache.h (modified) (1 diff)
-
JavaScriptCore/runtime/JSCast.h (modified) (1 diff)
-
JavaScriptCore/runtime/JSCellInlines.h (modified) (1 diff)
-
JavaScriptCore/runtime/JSGlobalObject.cpp (modified) (2 diffs)
-
JavaScriptCore/runtime/JSProxy.h (modified) (1 diff)
-
JavaScriptCore/runtime/JSType.cpp (modified) (1 diff)
-
JavaScriptCore/runtime/JSType.h (modified) (1 diff)
-
JavaScriptCore/runtime/Structure.h (modified) (1 diff)
-
JavaScriptCore/tools/JSDollarVM.cpp (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/workers/WorkerOrWorkletScriptController.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/tests/JSObjectGetProxyTargetTest.cpp
r261755 r273777 61 61 JSProxy* globalObjectProxyObject = jsCast<JSProxy*>(toJS(globalObjectProxy)); 62 62 globalObjectObject = jsCast<JSGlobalObject*>(globalObjectProxyObject->target()); 63 Structure* proxyStructure = JSProxy::createStructure(vm, globalObjectObject, globalObjectObject->objectPrototype() , PureForwardingProxyType);63 Structure* proxyStructure = JSProxy::createStructure(vm, globalObjectObject, globalObjectObject->objectPrototype()); 64 64 globalObjectRef = toRef(jsCast<JSObject*>(globalObjectObject)); 65 65 jsProxyObject = JSProxy::create(vm, proxyStructure); -
trunk/Source/JavaScriptCore/ChangeLog
r273768 r273777 1 2021-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 1 30 2021-03-02 Saam Barati <sbarati@apple.com> 2 31 -
trunk/Source/JavaScriptCore/runtime/HasOwnPropertyCache.h
r239427 r273777 88 88 return; 89 89 90 if (object->type() == PureForwardingProxyType || object->type() == ImpureProxyType)90 if (object->type() == PureForwardingProxyType) 91 91 return; 92 92 -
trunk/Source/JavaScriptCore/runtime/JSCast.h
r273766 r273777 80 80 macro(JSArrayBufferView, FirstTypedArrayType, LastTypedArrayType) \ 81 81 macro(JSPromise, JSType::JSPromiseType, JSType::JSPromiseType) \ 82 macro(JSProxy, JSType::PureForwardingProxyType, JSType:: ImpureProxyType) \82 macro(JSProxy, JSType::PureForwardingProxyType, JSType::PureForwardingProxyType) \ 83 83 macro(JSSet, JSType::JSSetType, JSType::JSSetType) \ 84 84 macro(JSMap, JSType::JSMapType, JSType::JSMapType) \ -
trunk/Source/JavaScriptCore/runtime/JSCellInlines.h
r273138 r273777 245 245 inline bool JSCell::isProxy() const 246 246 { 247 return m_type == ImpureProxyType || m_type ==PureForwardingProxyType || m_type == ProxyObjectType;247 return m_type == PureForwardingProxyType || m_type == ProxyObjectType; 248 248 } 249 249 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r273718 r273777 1904 1904 fixupPrototypeChainWithObjectPrototype(vm); 1905 1905 // 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)); 1907 1907 } 1908 1908 … … 2377 2377 m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this); 2378 2378 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)); 2380 2380 ASSERT(type() == GlobalObjectType); 2381 2381 } -
trunk/Source/JavaScriptCore/runtime/JSProxy.h
r273766 r273777 56 56 } 57 57 58 static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype , JSType proxyType)58 static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) 59 59 { 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()); 62 61 } 63 62 -
trunk/Source/JavaScriptCore/runtime/JSType.cpp
r272170 r273777 69 69 CASE(ErrorInstanceType) 70 70 CASE(PureForwardingProxyType) 71 CASE(ImpureProxyType)72 71 CASE(DirectArgumentsType) 73 72 CASE(ScopedArgumentsType) -
trunk/Source/JavaScriptCore/runtime/JSType.h
r272170 r273777 66 66 ErrorInstanceType, 67 67 PureForwardingProxyType, 68 ImpureProxyType,69 68 DirectArgumentsType, 70 69 ScopedArgumentsType, -
trunk/Source/JavaScriptCore/runtime/Structure.h
r273138 r273777 184 184 { 185 185 JSType type = m_blob.type(); 186 return type == ImpureProxyType || type ==PureForwardingProxyType || type == ProxyObjectType;186 return type == PureForwardingProxyType || type == ProxyObjectType; 187 187 } 188 188 -
trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp
r273138 r273777 2716 2716 return JSValue::encode(jsUndefined()); 2717 2717 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)); 2719 2719 JSProxy* proxy = JSProxy::create(vm, structure, jsTarget); 2720 2720 return JSValue::encode(proxy); -
trunk/Source/WebCore/ChangeLog
r273776 r273777 1 2021-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 1 11 2021-03-02 Sam Weinig <weinig@apple.com> 2 12 -
trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp
r273299 r273777 489 489 auto* contextPrototype = JSGlobalScopePrototype::create(*m_vm, nullptr, contextPrototypeStructure); 490 490 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()); 492 492 auto* proxy = JSProxy::create(*m_vm, proxyStructure); 493 493
Note:
See TracChangeset
for help on using the changeset viewer.