Changeset 254447 in webkit
- Timestamp:
- Jan 13, 2020 1:28:45 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r253896 r254447 901 901 runtime/JSModuleRecord.h 902 902 runtime/JSNativeStdFunction.h 903 runtime/JSNonDestructibleProxy.h904 903 runtime/JSONObject.h 905 904 runtime/JSObject.h -
trunk/Source/JavaScriptCore/ChangeLog
r254434 r254447 1 2020-01-13 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Put JSProxy in IsoSubspace 4 https://bugs.webkit.org/show_bug.cgi?id=206187 5 6 Reviewed by Mark Lam. 7 8 1. Put JSProxy in IsoSubspace. 9 2. Make JSProxy non-destructible since derived class JSWindowProxy is having its own IsoSubspace with destructibility. 10 11 * CMakeLists.txt: 12 * JavaScriptCore.xcodeproj/project.pbxproj: 13 * Sources.txt: 14 * runtime/JSGlobalObject.cpp: 15 (JSC::JSGlobalObject::resetPrototype): 16 (JSC::JSGlobalObject::finishCreation): 17 * runtime/JSNonDestructibleProxy.cpp: Removed. 18 * runtime/JSNonDestructibleProxy.h: Removed. 19 * runtime/JSProxy.h: 20 (JSC::JSProxy::subspaceFor): 21 * runtime/JSStringIterator.h: 22 * runtime/VM.cpp: 23 (JSC::VM::VM): 24 * runtime/VM.h: 25 1 26 2020-01-11 Keith Miller <keith_miller@apple.com> 2 27 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r254262 r254447 1822 1822 E38652E3237CA0C900E1D5EE /* BlockDirectoryBits.h in Headers */ = {isa = PBXBuildFile; fileRef = E38652E2237CA0C800E1D5EE /* BlockDirectoryBits.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1823 1823 E3893A1D2203A7C600E79A74 /* AsyncFromSyncIteratorPrototype.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = E3893A1C2203A7C600E79A74 /* AsyncFromSyncIteratorPrototype.lut.h */; }; 1824 E38D999C221B78BB00D50474 /* JSNonDestructibleProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E38D999A221B789F00D50474 /* JSNonDestructibleProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };1825 1824 E39006212208BFC4001019CF /* SubspaceAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = E39006202208BFC3001019CF /* SubspaceAccess.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1826 1825 E393ADD81FE702D00022D681 /* WeakMapImplInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E393ADD71FE702CC0022D681 /* WeakMapImplInlines.h */; }; … … 4970 4969 E38D060C1F8E814100649CF2 /* ScriptFetchParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptFetchParameters.h; sourceTree = "<group>"; }; 4971 4970 E38D060D1F8E814100649CF2 /* JSScriptFetchParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptFetchParameters.cpp; sourceTree = "<group>"; }; 4972 E38D999A221B789F00D50474 /* JSNonDestructibleProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSNonDestructibleProxy.h; sourceTree = "<group>"; };4973 E38D999B221B789F00D50474 /* JSNonDestructibleProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSNonDestructibleProxy.cpp; sourceTree = "<group>"; };4974 4971 E39006202208BFC3001019CF /* SubspaceAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubspaceAccess.h; sourceTree = "<group>"; }; 4975 4972 E3915C062309682900CB2561 /* WasmContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WasmContext.cpp; sourceTree = "<group>"; }; … … 7325 7322 E33E8D1A1B9013C300346B52 /* JSNativeStdFunction.cpp */, 7326 7323 E33E8D1B1B9013C300346B52 /* JSNativeStdFunction.h */, 7327 E38D999B221B789F00D50474 /* JSNonDestructibleProxy.cpp */,7328 E38D999A221B789F00D50474 /* JSNonDestructibleProxy.h */,7329 7324 BC22A3980E16E14800AF21C8 /* JSObject.cpp */, 7330 7325 BC22A3990E16E14800AF21C8 /* JSObject.h */, … … 9810 9805 E39DA4A71B7E8B7C0084F33A /* JSModuleRecord.h in Headers */, 9811 9806 E33E8D1D1B9013C300346B52 /* JSNativeStdFunction.h in Headers */, 9812 E38D999C221B78BB00D50474 /* JSNonDestructibleProxy.h in Headers */,9813 9807 BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */, 9814 9808 0F93275F1C21EF7F00CF6564 /* JSObjectInlines.h in Headers */, -
trunk/Source/JavaScriptCore/Sources.txt
r254252 r254447 855 855 runtime/JSModuleRecord.cpp 856 856 runtime/JSNativeStdFunction.cpp 857 runtime/JSNonDestructibleProxy.cpp858 857 runtime/JSONObject.cpp 859 858 runtime/JSObject.cpp -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r254252 r254447 111 111 #include "JSModuleRecord.h" 112 112 #include "JSNativeStdFunction.h" 113 #include "JSNonDestructibleProxy.h"114 113 #include "JSONObject.h" 115 114 #include "JSPromise.h" … … 1707 1706 fixupPrototypeChainWithObjectPrototype(vm); 1708 1707 // Whenever we change the prototype of the global object, we need to create a new JSProxy with the correct prototype. 1709 setGlobalThis(vm, JS NonDestructibleProxy::create(vm, JSNonDestructibleProxy::createStructure(vm, this, prototype, PureForwardingProxyType), this));1708 setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype, PureForwardingProxyType), this)); 1710 1709 } 1711 1710 … … 2211 2210 m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this); 2212 2211 init(vm); 2213 setGlobalThis(vm, JS NonDestructibleProxy::create(vm, JSNonDestructibleProxy::createStructure(vm, this, getPrototypeDirect(vm), PureForwardingProxyType), this));2212 setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, getPrototypeDirect(vm), PureForwardingProxyType), this)); 2214 2213 ASSERT(type() == GlobalObjectType); 2215 2214 } -
trunk/Source/JavaScriptCore/runtime/JSProxy.h
r251425 r254447 26 26 #pragma once 27 27 28 #include "JS DestructibleObject.h"28 #include "JSObject.h" 29 29 30 30 namespace JSC { 31 31 32 class JSProxy : public JS DestructibleObject {32 class JSProxy : public JSNonFinalObject { 33 33 public: 34 using Base = JS DestructibleObject;34 using Base = JSNonFinalObject; 35 35 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; 36 37 template<typename CellType, SubspaceAccess> 38 static IsoSubspace* subspaceFor(VM& vm) 39 { 40 static_assert(sizeof(CellType) == sizeof(JSProxy)); 41 return &vm.jsProxySpace; 42 } 36 43 37 44 static JSProxy* create(VM& vm, Structure* structure, JSObject* target) -
trunk/Source/JavaScriptCore/runtime/JSStringIterator.h
r254420 r254447 26 26 #pragma once 27 27 28 #include "JS Object.h"28 #include "JSInternalFieldObjectImpl.h" 29 29 30 30 namespace JSC { -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r254420 r254447 112 112 #include "JSPromise.h" 113 113 #include "JSPropertyNameEnumerator.h" 114 #include "JSProxy.h" 114 115 #include "JSScriptFetchParameters.h" 115 116 #include "JSScriptFetcher.h" … … 370 371 , globalLexicalEnvironmentSpace ISO_SUBSPACE_INIT(heap, globalLexicalEnvironmentHeapCellType.get(), JSGlobalLexicalEnvironment) 371 372 , internalFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), InternalFunction) // Hash:0xf845c464 373 , jsProxySpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSProxy) 372 374 , nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable) // Hash:0x67567f95 373 375 , numberObjectSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), NumberObject) -
trunk/Source/JavaScriptCore/runtime/VM.h
r254420 r254447 453 453 IsoSubspace globalLexicalEnvironmentSpace; 454 454 IsoSubspace internalFunctionSpace; 455 IsoSubspace jsProxySpace; 455 456 IsoSubspace nativeExecutableSpace; 456 457 IsoSubspace numberObjectSpace;
Note: See TracChangeset
for help on using the changeset viewer.