Changeset 227104 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
- Timestamp:
- Jan 17, 2018, 5:58:25 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r226956 r227104 213 213 } 214 214 215 static JSValue createAtomicsProperty(VM& vm, JSObject* object)216 {217 JSGlobalObject* global = jsCast<JSGlobalObject*>(object);218 return AtomicsObject::create(vm, global, AtomicsObject::createStructure(vm, global, global->objectPrototype()));219 }220 221 215 static EncodedJSValue JSC_HOST_CALL makeBoundFunction(ExecState* exec) 222 216 { … … 309 303 JSON createJSONProperty DontEnum|PropertyCallback 310 304 Math createMathProperty DontEnum|PropertyCallback 311 Atomics createAtomicsProperty DontEnum|PropertyCallback312 305 console createConsoleProperty DontEnum|PropertyCallback 313 306 Int8Array JSGlobalObject::m_typedArrayInt8 DontEnum|ClassStructure … … 665 658 JSArrayBufferConstructor* arrayBufferConstructor = JSArrayBufferConstructor::create(vm, JSArrayBufferConstructor::createStructure(vm, this, m_functionPrototype.get()), m_arrayBufferPrototype.get(), m_speciesGetterSetter.get(), ArrayBufferSharingMode::Default); 666 659 m_arrayBufferPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, arrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); 660 667 661 #if ENABLE(SHARED_ARRAY_BUFFER) 668 662 JSArrayBufferConstructor* sharedArrayBufferConstructor = nullptr; 669 663 sharedArrayBufferConstructor = JSArrayBufferConstructor::create(vm, JSArrayBufferConstructor::createStructure(vm, this, m_functionPrototype.get()), m_sharedArrayBufferPrototype.get(), m_speciesGetterSetter.get(), ArrayBufferSharingMode::Shared); 670 664 m_sharedArrayBufferPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, sharedArrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); 665 666 AtomicsObject* atomicsObject = AtomicsObject::create(vm, this, AtomicsObject::createStructure(vm, this, m_objectPrototype.get())); 671 667 #endif 668 672 669 #define CREATE_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) \ 673 670 capitalName ## Constructor* lowerName ## Constructor = capitalName ## Constructor::create(vm, capitalName ## Constructor::createStructure(vm, this, m_functionPrototype.get()), m_ ## lowerName ## Prototype.get(), m_speciesGetterSetter.get()); \ … … 748 745 #if ENABLE(SHARED_ARRAY_BUFFER) 749 746 putDirectWithoutTransition(vm, vm.propertyNames->SharedArrayBuffer, sharedArrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); 747 putDirectWithoutTransition(vm, Identifier::fromString(exec, "Atomics"), atomicsObject, static_cast<unsigned>(PropertyAttribute::DontEnum)); 750 748 #endif 751 749
Note:
See TracChangeset
for help on using the changeset viewer.