Changeset 197648 in webkit
- Timestamp:
- Mar 6, 2016 5:00:33 PM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 90 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r197646 r197648 268 268 JSLockHolder locker(exec); 269 269 270 JSObject* jsObject = toJS(object); 271 return toRef(exec, jsObject-> prototype());270 JSObject* jsObject = toJS(object); 271 return toRef(exec, jsObject->getPrototypeDirect()); 272 272 } 273 273 -
trunk/Source/JavaScriptCore/ChangeLog
r197646 r197648 1 2016-03-06 Saam Barati <sbarati@apple.com> 2 3 [[GetPrototypeOf]] should be a fully virtual method in the method table 4 https://bugs.webkit.org/show_bug.cgi?id=155002 5 6 Reviewed by Filip Pizlo. 7 8 This patch makes us more consistent with how the ES6 specification models the 9 [[GetPrototypeOf]] trap. Moving this method into ClassInfo::methodTable 10 is a prerequisite for implementing Proxy.[[GetPrototypeOf]]. This patch 11 still allows directly accessing the prototype for situations where this 12 is the desired behavior. This is equivalent to getting the internal 13 [[Prototype]] field as described in the specification. 14 15 * API/JSObjectRef.cpp: 16 (JSObjectGetPrototype): 17 (JSObjectSetPrototype): 18 * dfg/DFGOperations.cpp: 19 * dfg/DFGOperations.h: 20 * dfg/DFGSpeculativeJIT.cpp: 21 (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject): 22 (JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags): 23 * ftl/FTLLowerDFGToB3.cpp: 24 (JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf): 25 (JSC::FTL::DFG::LowerDFGToB3::compileInstanceOfCustom): 26 * jit/JITOpcodes.cpp: 27 (JSC::JIT::emit_op_instanceof): 28 (JSC::JIT::emitSlow_op_instanceof): 29 * jit/JITOpcodes32_64.cpp: 30 (JSC::JIT::emit_op_instanceof): 31 (JSC::JIT::emitSlow_op_instanceof): 32 * jit/JITOperations.cpp: 33 * jit/JITOperations.h: 34 * jsc.cpp: 35 (functionCreateProxy): 36 * llint/LLIntSlowPaths.cpp: 37 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 38 * llint/LowLevelInterpreter.asm: 39 * llint/LowLevelInterpreter32_64.asm: 40 * llint/LowLevelInterpreter64.asm: 41 * runtime/ArrayPrototype.cpp: 42 (JSC::speciesConstructArray): 43 * runtime/ClassInfo.h: 44 * runtime/FunctionPrototype.cpp: 45 (JSC::functionProtoFuncBind): 46 * runtime/IntlCollatorPrototype.cpp: 47 (JSC::IntlCollatorPrototypeGetterCompare): 48 * runtime/IntlDateTimeFormatPrototype.cpp: 49 (JSC::IntlDateTimeFormatPrototypeGetterFormat): 50 * runtime/IntlNumberFormatPrototype.cpp: 51 (JSC::IntlNumberFormatPrototypeGetterFormat): 52 * runtime/JSBoundFunction.cpp: 53 (JSC::hasInstanceBoundFunction): 54 (JSC::getBoundFunctionStructure): 55 (JSC::JSBoundFunction::create): 56 * runtime/JSBoundFunction.h: 57 * runtime/JSCJSValue.cpp: 58 (JSC::JSValue::putToPrimitive): 59 * runtime/JSCell.cpp: 60 (JSC::JSCell::setPrototype): 61 (JSC::JSCell::getPrototype): 62 * runtime/JSCell.h: 63 * runtime/JSGlobalObject.cpp: 64 (JSC::JSGlobalObject::init): 65 (JSC::JSGlobalObject::hasLegacyProfiler): 66 (JSC::lastInPrototypeChain): 67 (JSC::JSGlobalObject::objectPrototypeIsSane): 68 (JSC::JSGlobalObject::arrayPrototypeChainIsSane): 69 (JSC::JSGlobalObject::stringPrototypeChainIsSane): 70 * runtime/JSGlobalObject.h: 71 (JSC::JSGlobalObject::finishCreation): 72 * runtime/JSGlobalObjectFunctions.cpp: 73 (JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor): 74 (JSC::GlobalFuncProtoGetterFunctor::operator()): 75 (JSC::globalFuncProtoGetter): 76 * runtime/JSLexicalEnvironment.cpp: 77 (JSC::JSLexicalEnvironment::getOwnPropertySlot): 78 * runtime/JSObject.cpp: 79 (JSC::JSObject::calculatedClassName): 80 (JSC::JSObject::putInlineSlow): 81 (JSC::JSObject::setPrototypeWithCycleCheck): 82 (JSC::JSObject::setPrototype): 83 (JSC::JSObject::getPrototype): 84 (JSC::JSObject::defaultHasInstance): 85 (JSC::objectPrivateFuncInstanceOf): 86 (JSC::JSObject::getPropertyNames): 87 (JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype): 88 (JSC::JSObject::attemptToInterceptPutByIndexOnHole): 89 (JSC::JSObject::getGenericPropertyNames): 90 * runtime/JSObject.h: 91 (JSC::JSObject::finishCreation): 92 (JSC::JSObject::JSObject): 93 (JSC::JSObject::getPrototypeDirect): 94 (JSC::JSObject::getPrototype): 95 (JSC::JSObject::getOwnNonIndexPropertySlot): 96 (JSC::JSObject::getPropertySlot): 97 (JSC::JSObject::getNonIndexPropertySlot): 98 (JSC::JSObject::prototype): Deleted. 99 * runtime/JSObjectInlines.h: 100 (JSC::JSObject::canPerformFastPutInline): 101 * runtime/JSProxy.cpp: 102 (JSC::JSProxy::setTarget): 103 * runtime/JSTypedArrayViewConstructor.cpp: 104 (JSC::constructTypedArrayView): 105 * runtime/ObjectConstructor.cpp: 106 (JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor): 107 (JSC::ObjectConstructorGetPrototypeOfFunctor::operator()): 108 (JSC::objectConstructorGetPrototypeOf): 109 * runtime/ObjectPrototype.cpp: 110 (JSC::objectProtoFuncIsPrototypeOf): 111 * runtime/ProxyObject.cpp: 112 (JSC::performProxyGet): 113 (JSC::ProxyObject::performSetPrototype): 114 * runtime/StructureInlines.h: 115 (JSC::Structure::isValid): 116 * tests/stress/proxy-has-property.js: 117 (assert.let.h1.has): 118 (assert.let.h2.has): 119 (assert): 120 1 121 2016-03-06 Commit Queue <commit-queue@webkit.org> 2 122 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r197646 r197648 1393 1393 } 1394 1394 1395 size_t JIT_OPERATION operationDefaultHasInstance(ExecState* exec, JSCell* value, JSCell* proto) // Returns jsBoolean(True|False) on 64-bit. 1396 { 1397 VM* vm = &exec->vm(); 1398 NativeCallFrameTracer tracer(vm, exec); 1399 if (JSObject::defaultHasInstance(exec, value, proto)) 1400 return 1; 1401 return 0; 1402 } 1403 1395 1404 void JIT_OPERATION operationProcessTypeProfilerLogDFG(ExecState* exec) 1396 1405 { -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r197646 r197648 156 156 int64_t JIT_OPERATION operationConvertDoubleToInt52(double); 157 157 158 size_t JIT_OPERATION operationDefaultHasInstance(ExecState*, JSCell* value, JSCell* proto); 159 158 160 void JIT_OPERATION operationProcessTypeProfilerLogDFG(ExecState*) WTF_INTERNAL; 159 161 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r197646 r197648 2741 2741 // Walk up the prototype chain of the value (in scratchReg), comparing to prototypeReg. 2742 2742 MacroAssembler::Label loop(&m_jit); 2743 MacroAssembler::Jump performDefaultHasInstance = m_jit.branch8(MacroAssembler::Equal, 2744 MacroAssembler::Address(scratchReg, JSCell::typeInfoTypeOffset()), TrustedImm32(ProxyObjectType)); 2743 2745 m_jit.emitLoadStructure(scratchReg, scratchReg, scratch2Reg); 2744 2746 m_jit.loadPtr(MacroAssembler::Address(scratchReg, Structure::prototypeOffset() + CellPayloadOffset), scratchReg); … … 2756 2758 m_jit.move(MacroAssembler::TrustedImm32(0), scratchReg); 2757 2759 #endif 2758 MacroAssembler::Jump putResult = m_jit.jump(); 2760 MacroAssembler::JumpList doneJumps; 2761 doneJumps.append(m_jit.jump()); 2762 2763 performDefaultHasInstance.link(&m_jit); 2764 silentSpillAllRegisters(scratchReg); 2765 callOperation(operationDefaultHasInstance, scratchReg, valueReg, prototypeReg); 2766 silentFillAllRegisters(scratchReg); 2767 m_jit.exceptionCheck(); 2768 #if USE(JSVALUE64) 2769 m_jit.or32(TrustedImm32(ValueFalse), scratchReg); 2770 #endif 2771 doneJumps.append(m_jit.jump()); 2759 2772 2760 2773 isInstance.link(&m_jit); … … 2765 2778 #endif 2766 2779 2767 putResult.link(&m_jit);2780 doneJumps.link(&m_jit); 2768 2781 } 2769 2782 -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r197646 r197648 5948 5948 LBasicBlock notYetInstance = FTL_NEW_BLOCK(m_out, ("InstanceOf not yet instance")); 5949 5949 LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("InstanceOf continuation")); 5950 LBasicBlock loadPrototypeDirect = FTL_NEW_BLOCK(m_out, ("Instanceof defaultPrototypeFunction")); 5951 LBasicBlock defaultHasInstanceSlow = FTL_NEW_BLOCK(m_out, ("Instanceof defaultPrototypeFunction")); 5950 5952 5951 5953 LValue condition; … … 5965 5967 m_out.jump(loop); 5966 5968 5967 m_out.appendTo(loop, notYetInstance);5969 m_out.appendTo(loop, loadPrototypeDirect); 5968 5970 LValue value = m_out.phi(m_out.int64, originalValue); 5971 LValue type = m_out.load8ZeroExt32(value, m_heaps.JSCell_typeInfoType); 5972 m_out.branch( 5973 m_out.notEqual(type, m_out.constInt32(ProxyObjectType)), 5974 usually(loadPrototypeDirect), rarely(defaultHasInstanceSlow)); 5975 5976 m_out.appendTo(loadPrototypeDirect, notYetInstance); 5969 5977 LValue structure = loadStructure(value); 5970 5978 LValue currentPrototype = m_out.load64(structure, m_heaps.Structure_prototype); … … 5974 5982 unsure(continuation), unsure(notYetInstance)); 5975 5983 5976 m_out.appendTo(notYetInstance, continuation);5984 m_out.appendTo(notYetInstance, defaultHasInstanceSlow); 5977 5985 ValueFromBlock notInstanceResult = m_out.anchor(m_out.booleanFalse); 5978 5986 m_out.addIncomingToPhi(value, m_out.anchor(currentPrototype)); 5979 5987 m_out.branch(isCell(currentPrototype), unsure(loop), unsure(continuation)); 5988 5989 m_out.appendTo(defaultHasInstanceSlow, continuation); 5990 // We can use the value that we're looping with because we 5991 // can just continue off from wherever we bailed from the 5992 // loop. 5993 ValueFromBlock defaultHasInstanceResult = m_out.anchor( 5994 vmCall(m_out.boolean, m_out.operation(operationDefaultHasInstance), m_callFrame, value, prototype)); 5995 m_out.jump(continuation); 5980 5996 5981 5997 m_out.appendTo(continuation, lastNext); 5982 5998 setBoolean( 5983 m_out.phi(m_out.boolean, notCellResult, isInstanceResult, notInstanceResult ));5999 m_out.phi(m_out.boolean, notCellResult, isInstanceResult, notInstanceResult, defaultHasInstanceResult)); 5984 6000 } 5985 6001 -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r197646 r197648 154 154 Label loop(this); 155 155 156 addSlowCase(branch8(Equal, Address(regT2, JSCell::typeInfoTypeOffset()), TrustedImm32(ProxyObjectType))); 157 156 158 // Load the prototype of the object in regT2. If this is equal to regT1 - WIN! 157 159 // Otherwise, check if we've hit null - if we have then drop out of the loop, if not go again. … … 857 859 linkSlowCaseIfNotJSCell(iter, value); 858 860 linkSlowCaseIfNotJSCell(iter, proto); 861 linkSlowCase(iter); 859 862 linkSlowCase(iter); 860 863 emitGetVirtualRegister(value, regT0); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r197646 r197648 234 234 Label loop(this); 235 235 236 addSlowCase(branch8(Equal, Address(regT2, JSCell::typeInfoTypeOffset()), TrustedImm32(ProxyObjectType))); 237 236 238 // Load the prototype of the cell in regT2. If this is equal to regT1 - WIN! 237 239 // Otherwise, check if we've hit null - if we have then drop out of the loop, if not go again. … … 263 265 linkSlowCaseIfNotJSCell(iter, value); 264 266 linkSlowCaseIfNotJSCell(iter, proto); 267 linkSlowCase(iter); 265 268 linkSlowCase(iter); 266 269 -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r197646 r197648 1780 1780 JSValue proto = JSValue::decode(encodedProto); 1781 1781 1782 ASSERT(!value.isObject() || !proto.isObject());1783 1784 1782 bool result = JSObject::defaultHasInstance(exec, value, proto); 1785 1783 return JSValue::encode(jsBoolean(result)); -
trunk/Source/JavaScriptCore/jsc.cpp
r197646 r197648 1229 1229 return JSValue::encode(jsUndefined()); 1230 1230 JSObject* jsTarget = asObject(target.asCell()); 1231 Structure* structure = JSProxy::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsTarget-> prototype());1231 Structure* structure = JSProxy::createStructure(exec->vm(), exec->lexicalGlobalObject(), jsTarget->getPrototypeDirect()); 1232 1232 JSProxy* proxy = JSProxy::create(exec->vm(), structure, jsTarget); 1233 1233 return JSValue::encode(proxy); -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r197646 r197648 527 527 JSValue value = LLINT_OP_C(2).jsValue(); 528 528 JSValue proto = LLINT_OP_C(3).jsValue(); 529 ASSERT(!value.isObject() || !proto.isObject());530 529 LLINT_RETURN(jsBoolean(JSObject::defaultHasInstance(exec, value, proto))); 531 530 } -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r197646 r197648 1707 1707 dispatch(4) 1708 1708 1709 _llint_op_instanceof: 1710 traceExecution() 1711 callSlowPath(_llint_slow_path_instanceof) 1712 dispatch(4) 1713 1709 1714 1710 1715 # Lastly, make sure that we can link even though we don't support all opcodes. -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r197646 r197648 1205 1205 .opOverrideshasInstanceValueNotDefault: 1206 1206 storei 1, PayloadOffset[cfr, t3, 8] 1207 dispatch(4)1208 1209 _llint_op_instanceof:1210 traceExecution()1211 # Actually do the work.1212 loadi 12[PC], t01213 loadi 4[PC], t31214 loadConstantOrVariablePayload(t0, CellTag, t1, .opInstanceofSlow)1215 bbb JSCell::m_type[t1], ObjectType, .opInstanceofSlow1216 loadi 8[PC], t01217 loadConstantOrVariablePayload(t0, CellTag, t2, .opInstanceofSlow)1218 1219 # Register state: t1 = prototype, t2 = value1220 move 1, t01221 .opInstanceofLoop:1222 loadp JSCell::m_structureID[t2], t21223 loadi Structure::m_prototype + PayloadOffset[t2], t21224 bpeq t2, t1, .opInstanceofDone1225 btinz t2, .opInstanceofLoop1226 1227 move 0, t01228 .opInstanceofDone:1229 storei BooleanTag, TagOffset[cfr, t3, 8]1230 storei t0, PayloadOffset[cfr, t3, 8]1231 dispatch(4)1232 1233 .opInstanceofSlow:1234 callSlowPath(_llint_slow_path_instanceof)1235 1207 dispatch(4) 1236 1208 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r197646 r197648 1094 1094 1095 1095 1096 _llint_op_instanceof:1097 traceExecution()1098 # Actually do the work.1099 loadisFromInstruction(3, t0)1100 loadConstantOrVariableCell(t0, t1, .opInstanceofSlow)1101 bbb JSCell::m_type[t1], ObjectType, .opInstanceofSlow1102 loadisFromInstruction(2, t0)1103 loadConstantOrVariableCell(t0, t2, .opInstanceofSlow)1104 1105 # Register state: t1 = prototype, t2 = value1106 move 1, t01107 .opInstanceofLoop:1108 loadStructureAndClobberFirstArg(t2, t3)1109 loadq Structure::m_prototype[t3], t21110 bqeq t2, t1, .opInstanceofDone1111 btqz t2, tagMask, .opInstanceofLoop1112 1113 move 0, t01114 .opInstanceofDone:1115 orq ValueFalse, t01116 loadisFromInstruction(1, t3)1117 storeq t0, [cfr, t3, 8]1118 dispatch(4)1119 1120 .opInstanceofSlow:1121 callSlowPath(_llint_slow_path_instanceof)1122 dispatch(4)1123 1124 1096 _llint_op_instanceof_custom: 1125 1097 traceExecution() -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r197646 r197648 185 185 // We need prototype check for subclasses of Array, which are Array objects but have a different prototype by default. 186 186 if (LIKELY(!thisObject->hasCustomProperties() 187 && thisObject->globalObject()->arrayPrototype() == thisObject-> prototype()187 && thisObject->globalObject()->arrayPrototype() == thisObject->getPrototypeDirect() 188 188 && !thisObject->globalObject()->arrayPrototype()->didChangeConstructorOrSpeciesProperties())) 189 189 return std::make_pair(SpeciesConstructResult::FastPath, nullptr); -
trunk/Source/JavaScriptCore/runtime/ClassInfo.h
r197646 r197648 112 112 typedef bool (*SetPrototypeFunctionPtr)(JSObject*, ExecState*, JSValue, bool shouldThrowIfCantSet); 113 113 SetPrototypeFunctionPtr setPrototype; 114 115 typedef JSValue (*GetPrototypeFunctionPtr)(JSObject*, ExecState*); 116 GetPrototypeFunctionPtr getPrototype; 114 117 115 118 typedef void (*DumpToStreamFunctionPtr)(const JSCell*, PrintStream&); … … 167 170 &ClassName::isExtensible, \ 168 171 &ClassName::setPrototype, \ 172 &ClassName::getPrototype, \ 169 173 &ClassName::dumpToStream, \ 170 174 &ClassName::estimatedSize \ -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r197646 r197648 169 169 170 170 JSString* name = target.get(exec, exec->propertyNames().name).toString(exec); 171 return JSValue::encode(JSBoundFunction::create(vm, globalObject, targetObject, exec->argument(0), boundArgs, length, name->value(exec)));171 return JSValue::encode(JSBoundFunction::create(vm, exec, globalObject, targetObject, exec->argument(0), boundArgs, length, name->value(exec))); 172 172 } 173 173 -
trunk/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp
r197646 r197648 130 130 131 131 // c. Let bc be BoundFunctionCreate(F, «this value»). 132 boundCompare = JSBoundFunction::create(vm, globalObject, targetObject, collator, boundArgs, 2, ASCIILiteral("compare")); 132 boundCompare = JSBoundFunction::create(vm, state, globalObject, targetObject, collator, boundArgs, 2, ASCIILiteral("compare")); 133 if (vm.exception()) 134 return JSValue::encode(JSValue()); 133 135 // d. Set collator.[[boundCompare]] to bc. 134 136 collator->setBoundCompare(vm, boundCompare); -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp
r197646 r197648 135 135 136 136 // c. Let bf be BoundFunctionCreate(F, «this value»). 137 boundFormat = JSBoundFunction::create(vm, globalObject, targetObject, dtf, boundArgs, 1, ASCIILiteral("format")); 137 boundFormat = JSBoundFunction::create(vm, state, globalObject, targetObject, dtf, boundArgs, 1, ASCIILiteral("format")); 138 if (vm.exception()) 139 return JSValue::encode(JSValue()); 138 140 // d. Set dtf.[[boundFormat]] to bf. 139 141 dtf->setBoundFormat(vm, boundFormat); -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp
r197646 r197648 123 123 124 124 // c. Let bf be BoundFunctionCreate(F, «this value»). 125 boundFormat = JSBoundFunction::create(vm, globalObject, targetObject, nf, boundArgs, 1, ASCIILiteral("format")); 125 boundFormat = JSBoundFunction::create(vm, state, globalObject, targetObject, nf, boundArgs, 1, ASCIILiteral("format")); 126 if (vm.exception()) 127 return JSValue::encode(JSValue()); 126 128 // d. Set nf.[[boundFormat]] to bf. 127 129 nf->setBoundFormat(vm, boundFormat); -
trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
r197646 r197648 88 88 } 89 89 90 inline Structure* getBoundFunctionStructure(VM& vm, JSGlobalObject* globalObject, JSObject* targetFunction)90 inline Structure* getBoundFunctionStructure(VM& vm, ExecState* exec, JSGlobalObject* globalObject, JSObject* targetFunction) 91 91 { 92 JSValue prototype = targetFunction->structure(vm)->storedPrototype(); 92 JSValue prototype = targetFunction->getPrototype(vm, exec); 93 if (UNLIKELY(vm.exception())) 94 return nullptr; 93 95 JSFunction* targetJSFunction = jsDynamicCast<JSFunction*>(targetFunction); 94 96 … … 118 120 } 119 121 120 JSBoundFunction* JSBoundFunction::create(VM& vm, JSGlobalObject* globalObject, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int length, const String& name)122 JSBoundFunction* JSBoundFunction::create(VM& vm, ExecState* exec, JSGlobalObject* globalObject, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int length, const String& name) 121 123 { 122 124 ConstructData constructData; … … 124 126 bool canConstruct = constructType != ConstructType::None; 125 127 NativeExecutable* executable = vm.getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor, ASCIILiteral("Function.prototype.bind result")); 126 Structure* structure = getBoundFunctionStructure(vm, globalObject, targetFunction); 128 Structure* structure = getBoundFunctionStructure(vm, exec, globalObject, targetFunction); 129 if (UNLIKELY(vm.exception())) 130 return nullptr; 127 131 JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(vm.heap)) JSBoundFunction(vm, globalObject, structure, targetFunction, boundThis, boundArgs); 128 132 -
trunk/Source/JavaScriptCore/runtime/JSBoundFunction.h
r197646 r197648 41 41 const static unsigned StructureFlags = ~ImplementsDefaultHasInstance & Base::StructureFlags; 42 42 43 static JSBoundFunction* create(VM&, JSGlobalObject*, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int, const String&);43 static JSBoundFunction* create(VM&, ExecState*, JSGlobalObject*, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int, const String&); 44 44 45 45 static bool customHasInstance(JSObject*, ExecState*, JSValue); -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp
r197646 r197648 144 144 if (propertyName != exec->propertyNames().underscoreProto) { 145 145 for (; !obj->structure()->hasReadOnlyOrGetterSetterPropertiesExcludingProto(); obj = asObject(prototype)) { 146 prototype = obj-> prototype();146 prototype = obj->getPrototypeDirect(); 147 147 if (prototype.isNull()) { 148 148 if (slot.isStrictMode()) … … 179 179 } 180 180 181 prototype = obj->prototype(); 181 prototype = obj->getPrototype(vm, exec); 182 if (vm.exception()) 183 return; 182 184 if (prototype.isNull()) 183 185 break; -
trunk/Source/JavaScriptCore/runtime/JSCell.cpp
r197646 r197648 286 286 } 287 287 288 JSValue JSCell::getPrototype(JSObject*, ExecState*) 289 { 290 RELEASE_ASSERT_NOT_REACHED(); 291 } 292 288 293 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r197646 r197648 210 210 static NO_RETURN_DUE_TO_CRASH bool isExtensible(JSObject*, ExecState*); 211 211 static NO_RETURN_DUE_TO_CRASH bool setPrototype(JSObject*, ExecState*, JSValue, bool); 212 static NO_RETURN_DUE_TO_CRASH JSValue getPrototype(JSObject*, ExecState*); 212 213 213 214 static String className(const JSObject*); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r197646 r197648 614 614 } 615 615 616 resetPrototype(vm, prototype());616 resetPrototype(vm, getPrototypeDirect()); 617 617 } 618 618 … … 670 670 { 671 671 JSObject* o = object; 672 while (o-> prototype().isObject())673 o = asObject(o-> prototype());672 while (o->getPrototypeDirect().isObject()) 673 o = asObject(o->getPrototypeDirect()); 674 674 return o; 675 675 } … … 727 727 } 728 728 729 JSValue prototypeValue = current-> prototype();729 JSValue prototypeValue = current->getPrototypeDirect(); 730 730 if (prototypeValue.isNull()) 731 731 break; … … 786 786 { 787 787 return !hasIndexedProperties(m_objectPrototype->indexingType()) 788 && m_objectPrototype-> prototype().isNull();788 && m_objectPrototype->getPrototypeDirect().isNull(); 789 789 } 790 790 … … 792 792 { 793 793 return !hasIndexedProperties(m_arrayPrototype->indexingType()) 794 && m_arrayPrototype-> prototype() == m_objectPrototype.get()794 && m_arrayPrototype->getPrototypeDirect() == m_objectPrototype.get() 795 795 && objectPrototypeIsSane(); 796 796 } … … 799 799 { 800 800 return !hasIndexedProperties(m_stringPrototype->indexingType()) 801 && m_stringPrototype-> prototype() == m_objectPrototype.get()801 && m_stringPrototype->getPrototypeDirect() == m_objectPrototype.get() 802 802 && objectPrototypeIsSane(); 803 803 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r197646 r197648 380 380 m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this); 381 381 init(vm); 382 setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype(), PureForwardingProxyType), this));382 setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, getPrototypeDirect(), PureForwardingProxyType), this)); 383 383 } 384 384 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r197646 r197648 785 785 class GlobalFuncProtoGetterFunctor { 786 786 public: 787 GlobalFuncProtoGetterFunctor(JSObject* thisObject) 788 : m_hasSkippedFirstFrame(false) 787 GlobalFuncProtoGetterFunctor(ExecState* exec, JSObject* thisObject) 788 : m_exec(exec) 789 , m_hasSkippedFirstFrame(false) 789 790 , m_thisObject(thisObject) 790 791 , m_result(JSValue::encode(jsUndefined())) … … 802 803 803 804 if (m_thisObject->allowsAccessFrom(visitor->callFrame())) 804 m_result = JSValue::encode(m_thisObject-> prototype());805 m_result = JSValue::encode(m_thisObject->getPrototype(m_exec->vm(), m_exec)); 805 806 806 807 return StackVisitor::Done; … … 808 809 809 810 private: 811 ExecState* m_exec; 810 812 bool m_hasSkippedFirstFrame; 811 813 JSObject* m_thisObject; … … 823 825 return JSValue::encode(exec->thisValue().synthesizePrototype(exec)); 824 826 825 GlobalFuncProtoGetterFunctor functor(thisObject); 827 GlobalFuncProtoGetterFunctor functor(exec, thisObject); 828 // This can throw but it's just unneeded extra work to check for it. The return 829 // value from this function is only used as the return value from a host call. 830 // Therefore, the return value is only used if there wasn't an exception. 826 831 exec->iterate(functor); 827 832 return functor.result(); -
trunk/Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp
r197646 r197648 77 77 // lexical environment object getter properties or a prototype. 78 78 ASSERT(!thisObject->hasGetterSetterProperties()); 79 ASSERT(thisObject-> prototype().isNull());79 ASSERT(thisObject->getPrototypeDirect().isNull()); 80 80 return false; 81 81 } -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r197646 r197648 273 273 String prototypeFunctionName; 274 274 ExecState* exec = object->globalObject()->globalExec(); 275 PropertySlot slot(object-> structure()->storedPrototype(), PropertySlot::InternalMethodType::VMInquiry);275 PropertySlot slot(object->getPrototypeDirect(), PropertySlot::InternalMethodType::VMInquiry); 276 276 PropertyName constructor(exec->propertyNames().constructor); 277 277 if (object->getPropertySlot(exec, constructor, slot)) { … … 431 431 } 432 432 if (obj->type() == ProxyObjectType && propertyName != vm.propertyNames->underscoreProto) { 433 // FIXME: We shouldn't unconditionally perform [[Set]] here. 434 // We need to do more because this is observable behavior. 435 // https://bugs.webkit.org/show_bug.cgi?id=155012 433 436 ProxyObject* proxy = jsCast<ProxyObject*>(obj); 434 437 proxy->ProxyObject::put(proxy, exec, propertyName, value, slot); 435 438 return; 436 439 } 437 JSValue prototype = obj-> prototype();440 JSValue prototype = obj->getPrototypeDirect(); 438 441 if (prototype.isNull()) 439 442 break; … … 1202 1205 ASSERT(methodTable(vm)->toThis(this, exec, NotStrictMode) == this); 1203 1206 1204 if (this-> prototype() == prototype)1207 if (this->getPrototypeDirect() == prototype) 1205 1208 return true; 1206 1209 … … 1216 1219 1217 1220 JSValue nextPrototype = prototype; 1221 MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype; 1218 1222 while (nextPrototype && nextPrototype.isObject()) { 1219 1223 if (nextPrototype == this) { … … 1222 1226 return false; 1223 1227 } 1224 nextPrototype = asObject(nextPrototype)->prototype(); 1228 if (UNLIKELY(asObject(nextPrototype)->methodTable(vm)->getPrototype != defaultGetPrototype)) 1229 break; // We're done. Set the prototype. 1230 nextPrototype = asObject(nextPrototype)->getPrototypeDirect(); 1225 1231 } 1226 1232 setPrototypeDirect(vm, prototype); … … 1231 1237 { 1232 1238 return object->setPrototypeWithCycleCheck(exec->vm(), exec, prototype, shouldThrowIfCantSet); 1239 } 1240 1241 JSValue JSObject::getPrototype(JSObject* object, ExecState*) 1242 { 1243 return object->getPrototypeDirect(); 1233 1244 } 1234 1245 … … 1573 1584 } 1574 1585 1586 VM& vm = exec->vm(); 1575 1587 JSObject* object = asObject(value); 1576 while ((object = object->prototype().getObject())) { 1588 while (true) { 1589 JSValue objectValue = object->getPrototype(vm, exec); 1590 if (UNLIKELY(vm.exception())) 1591 return false; 1592 if (!objectValue.isObject()) 1593 return false; 1594 object = asObject(objectValue); 1577 1595 if (proto == object) 1578 1596 return true; 1579 1597 } 1580 return false;1598 ASSERT_NOT_REACHED(); 1581 1599 } 1582 1600 … … 1591 1609 void JSObject::getPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) 1592 1610 { 1593 object->methodTable(exec->vm())->getOwnPropertyNames(object, exec, propertyNames, mode);1594 if (UNLIKELY(exec->hadException()))1595 return;1596 1597 if (object->prototype().isNull())1598 return;1599 1600 1611 VM& vm = exec->vm(); 1601 JSObject* prototype = asObject(object->prototype()); 1612 object->methodTable(vm)->getOwnPropertyNames(object, exec, propertyNames, mode); 1613 if (UNLIKELY(vm.exception())) 1614 return; 1615 1616 JSValue nextProto = object->getPrototype(vm, exec); 1617 if (UNLIKELY(vm.exception())) 1618 return; 1619 if (nextProto.isNull()) 1620 return; 1621 1622 JSObject* prototype = asObject(nextProto); 1602 1623 while(1) { 1603 1624 if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) { … … 1606 1627 } 1607 1628 prototype->methodTable(vm)->getOwnPropertyNames(prototype, exec, propertyNames, mode); 1608 if (UNLIKELY( exec->hadException()))1629 if (UNLIKELY(vm.exception())) 1609 1630 return; 1610 JSValue nextProto = prototype->prototype(); 1631 nextProto = prototype->getPrototype(vm, exec); 1632 if (UNLIKELY(vm.exception())) 1633 return; 1611 1634 if (nextProto.isNull()) 1612 1635 break; … … 2028 2051 } 2029 2052 2030 JSValue prototypeValue = current-> prototype();2053 JSValue prototypeValue = current->getPrototypeDirect(); 2031 2054 if (prototypeValue.isNull()) 2032 2055 return false; … … 2038 2061 bool JSObject::attemptToInterceptPutByIndexOnHole(ExecState* exec, unsigned i, JSValue value, bool shouldThrow) 2039 2062 { 2040 JSValue prototypeValue = prototype();2063 JSValue prototypeValue = getPrototypeDirect(); 2041 2064 if (prototypeValue.isNull()) 2042 2065 return false; … … 3030 3053 VM& vm = exec->vm(); 3031 3054 object->methodTable(vm)->getOwnPropertyNames(object, exec, propertyNames, EnumerationMode(mode, JSObjectPropertiesMode::Exclude)); 3032 if (UNLIKELY(exec->hadException())) 3033 return; 3034 3035 if (object->prototype().isNull()) 3036 return; 3037 3038 JSObject* prototype = asObject(object->prototype()); 3055 if (UNLIKELY(vm.exception())) 3056 return; 3057 3058 JSValue nextProto = object->getPrototype(vm, exec); 3059 if (UNLIKELY(vm.exception())) 3060 return; 3061 if (nextProto.isNull()) 3062 return; 3063 3064 JSObject* prototype = asObject(nextProto); 3039 3065 while (true) { 3040 3066 if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) { … … 3045 3071 if (UNLIKELY(exec->hadException())) 3046 3072 return; 3047 JSValue nextProto = prototype->prototype(); 3073 nextProto = prototype->getPrototype(vm, exec); 3074 if (UNLIKELY(vm.exception())) 3075 return; 3048 3076 if (nextProto.isNull()) 3049 3077 break; -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r197646 r197648 104 104 JS_EXPORT_PRIVATE static String calculatedClassName(JSObject*); 105 105 106 JSValue prototype() const; 106 // This is the fully virtual [[GetPrototypeOf]] internal function defined 107 // in the ECMAScript 6 specification. Use this when doing a [[GetPrototypeOf]] 108 // operation as dictated in the specification. 109 JSValue getPrototype(VM&, ExecState*); 110 JS_EXPORT_PRIVATE static JSValue getPrototype(JSObject*, ExecState*); 111 // This gets the prototype directly off of the structure. This does not do 112 // dynamic dispatch on the getPrototype method table method. It is not valid 113 // to use this when performing a [[GetPrototypeOf]] operation in the specification. 114 // It is valid to use though when you know that you want to directly get it 115 // without consulting the method table. This is akin to getting the [[Prototype]] 116 // internal field directly as described in the specification. 117 JSValue getPrototypeDirect() const; 118 107 119 // This sets the prototype without checking for cycles and without 108 120 // doing dynamic dispatch on [[SetPrototypeOf]] operation in the specification. … … 760 772 Base::finishCreation(vm); 761 773 ASSERT(inherits(info())); 762 ASSERT( prototype().isNull() || Heap::heap(this) == Heap::heap(prototype()));774 ASSERT(getPrototypeDirect().isNull() || Heap::heap(this) == Heap::heap(getPrototypeDirect())); 763 775 ASSERT(structure()->isObject()); 764 776 ASSERT(classInfo()); … … 1125 1137 } 1126 1138 1127 inline JSValue JSObject:: prototype() const1139 inline JSValue JSObject::getPrototypeDirect() const 1128 1140 { 1129 1141 return structure()->storedPrototype(); 1142 } 1143 1144 inline JSValue JSObject::getPrototype(VM& vm, ExecState* exec) 1145 { 1146 auto getPrototypeMethod = methodTable(vm)->getPrototype; 1147 MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype; 1148 if (LIKELY(getPrototypeMethod == defaultGetPrototype)) 1149 return getPrototypeDirect(); 1150 return getPrototypeMethod(this, exec); 1130 1151 } 1131 1152 … … 1205 1226 return object->getNonIndexPropertySlot(exec, propertyName, slot); 1206 1227 } 1228 ASSERT(object->type() != ProxyObjectType); 1207 1229 Structure& structure = *structureIDTable.get(object->structureID()); 1208 1230 if (object->getOwnNonIndexPropertySlot(vm, structure, propertyName, slot)) … … 1224 1246 auto& structureIDTable = vm.heap.structureIDTable(); 1225 1247 JSObject* object = this; 1248 MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype; 1226 1249 while (true) { 1227 1250 Structure& structure = *structureIDTable.get(object->structureID()); 1228 1251 if (structure.classInfo()->methodTable.getOwnPropertySlotByIndex(object, exec, propertyName, slot)) 1229 1252 return true; 1230 JSValue prototype = structure.storedPrototype(); 1253 if (UNLIKELY(vm.exception())) 1254 return false; 1255 JSValue prototype; 1256 if (LIKELY(structure.classInfo()->methodTable.getPrototype == defaultGetPrototype || slot.internalMethodType() == PropertySlot::InternalMethodType::VMInquiry)) 1257 prototype = structure.storedPrototype(); 1258 else { 1259 prototype = object->getPrototype(vm, exec); 1260 if (vm.exception()) 1261 return false; 1262 } 1231 1263 if (!prototype.isObject()) 1232 1264 return false; … … 1243 1275 auto& structureIDTable = vm.heap.structureIDTable(); 1244 1276 JSObject* object = this; 1277 MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype; 1245 1278 while (true) { 1246 1279 Structure& structure = *structureIDTable.get(object->structureID()); … … 1248 1281 if (object->getOwnNonIndexPropertySlot(vm, structure, propertyName, slot)) 1249 1282 return true; 1250 } else if (structure.classInfo()->methodTable.getOwnPropertySlot(object, exec, propertyName, slot)) 1251 return true; 1252 JSValue prototype = structure.storedPrototype(); 1283 } else { 1284 if (structure.classInfo()->methodTable.getOwnPropertySlot(object, exec, propertyName, slot)) 1285 return true; 1286 if (UNLIKELY(vm.exception())) 1287 return false; 1288 } 1289 JSValue prototype; 1290 if (LIKELY(structure.classInfo()->methodTable.getPrototype == defaultGetPrototype || slot.internalMethodType() == PropertySlot::InternalMethodType::VMInquiry)) 1291 prototype = structure.storedPrototype(); 1292 else { 1293 prototype = object->getPrototype(vm, exec); 1294 if (vm.exception()) 1295 return false; 1296 } 1253 1297 if (!prototype.isObject()) 1254 1298 return false; -
trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h
r197646 r197648 43 43 return false; 44 44 45 prototype = obj-> prototype();45 prototype = obj->getPrototypeDirect(); 46 46 if (prototype.isNull()) 47 47 return true; -
trunk/Source/JavaScriptCore/runtime/JSProxy.cpp
r197646 r197648 48 48 ASSERT_ARG(globalObject, globalObject); 49 49 m_target.set(vm, this, globalObject); 50 setPrototypeDirect(vm, globalObject-> prototype());50 setPrototypeDirect(vm, globalObject->getPrototypeDirect()); 51 51 52 52 PrototypeMap& prototypeMap = vm.prototypeMap; -
trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp
r197646 r197648 78 78 return JSValue::encode(throwTypeError(exec, "new.target passed to TypedArray is not a valid constructor.")); 79 79 80 for (; !value.isNull(); value = jsCast<JSObject*>(value)-> prototype()) {80 for (; !value.isNull(); value = jsCast<JSObject*>(value)->getPrototypeDirect()) { 81 81 if (jsDynamicCast<JSTypedArrayViewConstructor*>(value)) 82 82 return JSValue::encode(throwTypeError(exec, "Unable to find TypedArray constructor that inherits from TypedArray.")); -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r197646 r197648 151 151 class ObjectConstructorGetPrototypeOfFunctor { 152 152 public: 153 ObjectConstructorGetPrototypeOfFunctor(JSObject* object) 154 : m_hasSkippedFirstFrame(false) 153 ObjectConstructorGetPrototypeOfFunctor(ExecState* exec, JSObject* object) 154 : m_exec(exec) 155 , m_hasSkippedFirstFrame(false) 155 156 , m_object(object) 156 157 , m_result(jsUndefined()) … … 168 169 169 170 if (m_object->allowsAccessFrom(visitor->callFrame())) 170 m_result = m_object-> prototype();171 m_result = m_object->getPrototype(m_exec->vm(), m_exec); 171 172 return StackVisitor::Done; 172 173 } 173 174 174 175 private: 176 ExecState* m_exec; 175 177 bool m_hasSkippedFirstFrame; 176 178 JSObject* m_object; … … 180 182 JSValue objectConstructorGetPrototypeOf(ExecState* exec, JSObject* object) 181 183 { 182 ObjectConstructorGetPrototypeOfFunctor functor(object); 184 ObjectConstructorGetPrototypeOfFunctor functor(exec, object); 185 // This can throw but it's just unneeded extra work to check for it. The return 186 // value from this function is only used as the return value from a host call. 187 // Therefore, the return value is only used if there wasn't an exception. 183 188 exec->iterate(functor); 184 189 return functor.result(); -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r197646 r197648 102 102 return JSValue::encode(jsBoolean(false)); 103 103 104 JSValue v = asObject(exec->argument(0))->prototype(); 104 VM& vm = exec->vm(); 105 JSValue v = asObject(exec->argument(0))->getPrototype(vm, exec); 106 if (UNLIKELY(vm.exception())) 107 return JSValue::encode(JSValue()); 105 108 106 109 while (true) { … … 109 112 if (v == thisObj) 110 113 return JSValue::encode(jsBoolean(true)); 111 v = asObject(v)->prototype(); 114 v = asObject(v)->getPrototype(vm, exec); 115 if (UNLIKELY(vm.exception())) 116 return JSValue::encode(JSValue()); 112 117 } 113 118 } -
trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp
r197646 r197648 91 91 // https://bugs.webkit.org/show_bug.cgi?id=154320 92 92 while (true) { 93 if (LIKELY(proxyObjectAsObject-> inherits(ProxyObject::info())))93 if (LIKELY(proxyObjectAsObject->type() == ProxyObjectType)) 94 94 break; 95 95 96 Structure& structure = *vm.heap.structureIDTable().get(proxyObjectAsObject->structureID()); 97 JSValue prototype = structure.storedPrototype(); 96 JSValue prototype = proxyObjectAsObject->getPrototypeDirect(); 98 97 RELEASE_ASSERT(prototype.isObject()); 99 98 proxyObjectAsObject = asObject(prototype); … … 1007 1006 return true; 1008 1007 1009 JSValue targetPrototype = target->prototype(); 1008 JSValue targetPrototype = target->getPrototype(vm, exec); 1009 if (vm.exception()) 1010 return false; 1010 1011 if (!sameValue(exec, prototype, targetPrototype)) { 1011 1012 throwVMTypeError(exec, ASCIILiteral("Proxy 'setPrototypeOf' trap returned true when its target is non-extensible and the new prototype value is not the same as the current prototype value. It should have returned false.")); -
trunk/Source/JavaScriptCore/runtime/StructureInlines.h
r197646 r197648 211 211 return false; 212 212 ++cachedStructure; 213 prototype = asObject(prototype)-> prototype();213 prototype = asObject(prototype)->getPrototypeDirect(); 214 214 } 215 215 return prototype.isNull() && !*cachedStructure; -
trunk/Source/JavaScriptCore/tests/stress/proxy-has-property.js
r197646 r197648 368 368 } 369 369 } 370 371 { 372 let e1 = null; 373 let e2 = null; 374 let t1 = {}; 375 let called1 = false; 376 let h1 = { 377 has: function(theTarget, propName) { 378 called1 = true; 379 e1 = new Error; 380 throw e1; 381 return false; 382 } 383 }; 384 let p1 = new Proxy(t1, h1); 385 386 let t2 = {}; 387 t2.__proto__ = p1; 388 let h2 = { 389 has: function(theTarget, propName) { 390 e2 = new Error; 391 throw e2; 392 return false; 393 } 394 }; 395 let p2 = new Proxy(t2, h2); 396 for (let i = 0; i < 500; i++) { 397 let threw = false; 398 try { 399 10 in p2; 400 } catch(e) { 401 assert(e === e2); 402 threw = true; 403 } 404 assert(threw); 405 assert(!called1); 406 } 407 } 408 409 { 410 let e1 = null; 411 let e2 = null; 412 let t1 = {}; 413 let called1 = false; 414 let h1 = { 415 has: function(theTarget, propName) { 416 called1 = true; 417 e1 = new Error; 418 throw e1; 419 return false; 420 } 421 }; 422 let p1 = new Proxy(t1, h1); 423 424 let t2 = {}; 425 t2.__proto__ = p1; 426 let h2 = { 427 has: function(theTarget, propName) { 428 e2 = new Error; 429 throw e2; 430 return false; 431 } 432 }; 433 let p2 = new Proxy(t2, h2); 434 for (let i = 0; i < 500; i++) { 435 let threw = false; 436 try { 437 "foo" in p2; 438 } catch(e) { 439 assert(e === e2); 440 threw = true; 441 } 442 assert(threw); 443 assert(!called1); 444 } 445 } -
trunk/Source/WebCore/ChangeLog
r197642 r197648 1 2016-03-06 Saam Barati <sbarati@apple.com> 2 3 [[GetPrototypeOf]] should be a fully virtual method in the method table 4 https://bugs.webkit.org/show_bug.cgi?id=155002 5 6 Reviewed by Filip Pizlo. 7 8 Change ::getPrototype(.) to ::prototype(.) in various places to prevent 9 a naming conflict with JSC. 10 11 No new tests because no new functionality was added. 12 13 * bindings/js/JSDOMWindowShell.cpp: 14 (WebCore::JSDOMWindowShell::setWindow): 15 * bindings/js/JSImageConstructor.cpp: 16 (WebCore::JSImageConstructor::initializeProperties): 17 (WebCore::JSImageConstructor::prototypeForStructure): 18 * bindings/js/WorkerScriptController.cpp: 19 (WebCore::WorkerScriptController::initScript): 20 * bindings/scripts/CodeGeneratorJS.pm: 21 (GenerateHeader): 22 (GenerateImplementation): 23 (GenerateConstructorHelperMethods): 24 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 25 (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties): 26 (WebCore::JSTestActiveDOMObject::createPrototype): 27 (WebCore::JSTestActiveDOMObject::prototype): 28 (WebCore::JSTestActiveDOMObject::getPrototype): Deleted. 29 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: 30 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: 31 (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties): 32 (WebCore::JSTestClassWithJSBuiltinConstructor::createPrototype): 33 (WebCore::JSTestClassWithJSBuiltinConstructor::prototype): 34 (WebCore::JSTestClassWithJSBuiltinConstructor::getPrototype): Deleted. 35 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: 36 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: 37 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties): 38 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype): 39 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::prototype): 40 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): Deleted. 41 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: 42 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 43 (WebCore::JSTestCustomNamedGetterConstructor::initializeProperties): 44 (WebCore::JSTestCustomNamedGetter::createPrototype): 45 (WebCore::JSTestCustomNamedGetter::prototype): 46 (WebCore::JSTestCustomNamedGetter::getPrototype): Deleted. 47 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: 48 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 49 (WebCore::JSTestEventConstructorConstructor::initializeProperties): 50 (WebCore::JSTestEventConstructor::createPrototype): 51 (WebCore::JSTestEventConstructor::prototype): 52 (WebCore::JSTestEventConstructor::getPrototype): Deleted. 53 * bindings/scripts/test/JS/JSTestEventConstructor.h: 54 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 55 (WebCore::JSTestEventTargetConstructor::initializeProperties): 56 (WebCore::JSTestEventTarget::createPrototype): 57 (WebCore::JSTestEventTarget::prototype): 58 (WebCore::JSTestEventTarget::getPrototype): Deleted. 59 * bindings/scripts/test/JS/JSTestEventTarget.h: 60 * bindings/scripts/test/JS/JSTestException.cpp: 61 (WebCore::JSTestExceptionConstructor::initializeProperties): 62 (WebCore::JSTestException::createPrototype): 63 (WebCore::JSTestException::prototype): 64 (WebCore::JSTestException::getPrototype): Deleted. 65 * bindings/scripts/test/JS/JSTestException.h: 66 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: 67 (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties): 68 (WebCore::JSTestGenerateIsReachable::createPrototype): 69 (WebCore::JSTestGenerateIsReachable::prototype): 70 (WebCore::JSTestGenerateIsReachable::getPrototype): Deleted. 71 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: 72 * bindings/scripts/test/JS/JSTestInterface.cpp: 73 (WebCore::JSTestInterfaceConstructor::initializeProperties): 74 (WebCore::JSTestInterface::createPrototype): 75 (WebCore::JSTestInterface::prototype): 76 (WebCore::JSTestInterface::getPrototype): Deleted. 77 * bindings/scripts/test/JS/JSTestInterface.h: 78 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 79 (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties): 80 (WebCore::JSTestJSBuiltinConstructor::createPrototype): 81 (WebCore::JSTestJSBuiltinConstructor::prototype): 82 (WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted. 83 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: 84 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 85 (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties): 86 (WebCore::JSTestMediaQueryListListener::createPrototype): 87 (WebCore::JSTestMediaQueryListListener::prototype): 88 (WebCore::JSTestMediaQueryListListener::getPrototype): Deleted. 89 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: 90 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 91 (WebCore::JSTestNamedConstructorConstructor::initializeProperties): 92 (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties): 93 (WebCore::JSTestNamedConstructor::createPrototype): 94 (WebCore::JSTestNamedConstructor::prototype): 95 (WebCore::JSTestNamedConstructor::getPrototype): Deleted. 96 * bindings/scripts/test/JS/JSTestNamedConstructor.h: 97 * bindings/scripts/test/JS/JSTestNode.cpp: 98 (WebCore::JSTestNodeConstructor::initializeProperties): 99 (WebCore::JSTestNode::createPrototype): 100 (WebCore::JSTestNode::prototype): 101 (WebCore::JSTestNode::getPrototype): Deleted. 102 * bindings/scripts/test/JS/JSTestNode.h: 103 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: 104 (WebCore::JSTestNondeterministicConstructor::initializeProperties): 105 (WebCore::JSTestNondeterministic::createPrototype): 106 (WebCore::JSTestNondeterministic::prototype): 107 (WebCore::JSTestNondeterministic::getPrototype): Deleted. 108 * bindings/scripts/test/JS/JSTestNondeterministic.h: 109 * bindings/scripts/test/JS/JSTestObj.cpp: 110 (WebCore::JSTestObjConstructor::initializeProperties): 111 (WebCore::JSTestObj::createPrototype): 112 (WebCore::JSTestObj::prototype): 113 (WebCore::JSTestObj::getPrototype): Deleted. 114 * bindings/scripts/test/JS/JSTestObj.h: 115 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 116 (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties): 117 (WebCore::JSTestOverloadedConstructors::createPrototype): 118 (WebCore::JSTestOverloadedConstructors::prototype): 119 (WebCore::JSTestOverloadedConstructors::getPrototype): Deleted. 120 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: 121 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 122 (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties): 123 (WebCore::JSTestOverrideBuiltins::createPrototype): 124 (WebCore::JSTestOverrideBuiltins::prototype): 125 (WebCore::JSTestOverrideBuiltins::getPrototype): Deleted. 126 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: 127 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 128 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties): 129 (WebCore::JSTestSerializedScriptValueInterface::createPrototype): 130 (WebCore::JSTestSerializedScriptValueInterface::prototype): 131 (WebCore::JSTestSerializedScriptValueInterface::getPrototype): Deleted. 132 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: 133 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 134 (WebCore::JSTestTypedefsConstructor::initializeProperties): 135 (WebCore::JSTestTypedefs::createPrototype): 136 (WebCore::JSTestTypedefs::prototype): 137 (WebCore::JSTestTypedefs::getPrototype): Deleted. 138 * bindings/scripts/test/JS/JSTestTypedefs.h: 139 * bindings/scripts/test/JS/JSattribute.cpp: 140 (WebCore::JSattributeConstructor::initializeProperties): 141 (WebCore::JSattribute::createPrototype): 142 (WebCore::JSattribute::prototype): 143 (WebCore::JSattribute::getPrototype): Deleted. 144 * bindings/scripts/test/JS/JSattribute.h: 145 * bindings/scripts/test/JS/JSreadonly.cpp: 146 (WebCore::JSreadonlyConstructor::initializeProperties): 147 (WebCore::JSreadonly::createPrototype): 148 (WebCore::JSreadonly::prototype): 149 (WebCore::JSreadonly::getPrototype): Deleted. 150 * bindings/scripts/test/JS/JSreadonly.h: 151 1 152 2016-03-06 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 153 -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
r197628 r197648 310 310 if (classInfo == JSDOMWindowShell::info()) 311 311 return jsCast<JSDOMWindowShell*>(object)->window(); 312 value = object-> prototype();312 value = object->getPrototypeDirect(); 313 313 } 314 314 return 0; -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r196722 r197648 170 170 // to frames that happen to have names corresponding to properties on the prototype. 171 171 // This seems to only serve to leak some information cross-origin. 172 JSValue proto = thisObject-> prototype();172 JSValue proto = thisObject->getPrototypeDirect(); 173 173 if (proto.isObject() && asObject(proto)->getPropertySlot(exec, propertyName, slot)) { 174 174 thisObject->printErrorMessage(errorMessage); … … 193 193 static bool jsDOMWindowGetOwnPropertySlotNamedItemGetter(JSDOMWindow* thisObject, Frame& frame, ExecState* exec, PropertyName propertyName, PropertySlot& slot) 194 194 { 195 JSValue proto = thisObject-> prototype();195 JSValue proto = thisObject->getPrototypeDirect(); 196 196 if (proto.isObject() && asObject(proto)->hasProperty(exec, propertyName)) 197 197 return false; -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
r196563 r197648 86 86 JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this); 87 87 prototype->structure()->setGlobalObject(vm, jsDOMWindow); 88 prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget:: getPrototype(vm, jsDOMWindow));88 prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::prototype(vm, jsDOMWindow)); 89 89 setWindow(vm, jsDOMWindow); 90 90 ASSERT(jsDOMWindow->globalObject() == jsDOMWindow); -
trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp
r196392 r197648 37 37 template<> void JSImageConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 38 38 { 39 putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement:: getPrototype(vm, &globalObject), None);39 putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::prototype(vm, &globalObject), None); 40 40 } 41 41 -
trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h
r196423 r197648 51 51 return true; 52 52 53 JSC::JSValue proto = element-> prototype();53 JSC::JSValue proto = element->getPrototypeDirect(); 54 54 if (proto.isObject() && JSC::jsCast<JSC::JSObject*>(asObject(proto))->hasProperty(exec, propertyName)) 55 55 return false; -
trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp
r196745 r197648 62 62 static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties"); 63 63 64 JSValue prototype = thisObject-> prototype();64 JSValue prototype = thisObject->getPrototypeDirect(); 65 65 if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot)) 66 66 return Base::deleteProperty(thisObject, exec, propertyName); … … 107 107 static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties"); 108 108 109 JSValue prototype = this-> prototype();109 JSValue prototype = this->getPrototypeDirect(); 110 110 if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot)) 111 111 return false; -
trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp
r196594 r197648 96 96 ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper); 97 97 workerGlobalScopePrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); 98 workerGlobalScopePrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSEventTarget:: getPrototype(*m_vm, m_workerGlobalScopeWrapper.get()));98 workerGlobalScopePrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSEventTarget::prototype(*m_vm, m_workerGlobalScopeWrapper.get())); 99 99 dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); 100 100 } 101 101 ASSERT(m_workerGlobalScopeWrapper->globalObject() == m_workerGlobalScopeWrapper); 102 ASSERT(asObject(m_workerGlobalScopeWrapper-> prototype())->globalObject() == m_workerGlobalScopeWrapper);102 ASSERT(asObject(m_workerGlobalScopeWrapper->getPrototypeDirect())->globalObject() == m_workerGlobalScopeWrapper); 103 103 104 104 m_consoleClient = std::make_unique<WorkerConsoleClient>(*m_workerGlobalScope); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r197642 r197648 409 409 # https://heycam.github.io/webidl/#dfn-named-properties-object 410 410 my $prototypeCheck = sub { 411 push(@getOwnPropertySlotImpl, " ${namespaceMaybe}JSValue proto = thisObject-> prototype();\n");411 push(@getOwnPropertySlotImpl, " ${namespaceMaybe}JSValue proto = thisObject->getPrototypeDirect();\n"); 412 412 push(@getOwnPropertySlotImpl, " if (proto.isObject() && jsCast<${namespaceMaybe}JSObject*>(proto)->hasProperty(state, propertyName))\n"); 413 413 push(@getOwnPropertySlotImpl, " return false;\n\n"); … … 982 982 unless (IsDOMGlobalObject($interface)) { 983 983 push(@headerContent, " static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);\n"); 984 push(@headerContent, " static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);\n");984 push(@headerContent, " static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);\n"); 985 985 } 986 986 … … 2196 2196 push(@implContent, "{\n"); 2197 2197 if ($hasParent && $parentClassName ne "JSC::DOMNodeFilter") { 2198 push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, ${parentClassName}:: getPrototype(vm, globalObject)));\n");2198 push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, ${parentClassName}::prototype(vm, globalObject)));\n"); 2199 2199 } else { 2200 2200 my $prototype = $interface->isException ? "errorPrototype" : "objectPrototype"; … … 2203 2203 push(@implContent, "}\n\n"); 2204 2204 2205 push(@implContent, "JSObject* ${className}:: getPrototype(VM& vm, JSGlobalObject* globalObject)\n");2205 push(@implContent, "JSObject* ${className}::prototype(VM& vm, JSGlobalObject* globalObject)\n"); 2206 2206 push(@implContent, "{\n"); 2207 2207 push(@implContent, " return getDOMPrototype<${className}>(vm, globalObject);\n"); … … 2334 2334 # Fallback to trying to searching the prototype chain for compatibility reasons. 2335 2335 push(@implContent, " JSObject* thisObject = JSValue::decode(thisValue).getObject();\n"); 2336 push(@implContent, " for (thisObject = thisObject ? thisObject-> prototype().getObject() : nullptr; thisObject; thisObject = thisObject->prototype().getObject()) {\n");2336 push(@implContent, " for (thisObject = thisObject ? thisObject->getPrototypeDirect().getObject() : nullptr; thisObject; thisObject = thisObject->getPrototypeDirect().getObject()) {\n"); 2337 2337 push(@implContent, " if ((castedThis = " . GetCastingHelperForThisObject($interface) . "(thisObject)))\n"); 2338 2338 push(@implContent, " break;\n"); … … 2637 2637 # Fallback to trying to searching the prototype chain for compatibility reasons. 2638 2638 push(@implContent, " JSObject* thisObject = JSValue::decode(thisValue).getObject();\n"); 2639 push(@implContent, " for (thisObject = thisObject ? thisObject-> prototype().getObject() : nullptr; thisObject; thisObject = thisObject->prototype().getObject()) {\n");2639 push(@implContent, " for (thisObject = thisObject ? thisObject->getPrototypeDirect().getObject() : nullptr; thisObject; thisObject = thisObject->getPrototypeDirect().getObject()) {\n"); 2640 2640 push(@implContent, " if ((castedThis = " . GetCastingHelperForThisObject($interface) . "(thisObject)))\n"); 2641 2641 push(@implContent, " break;\n"); … … 5028 5028 # https://heycam.github.io/webidl/#interface-prototype-object 5029 5029 if (IsDOMGlobalObject($interface)) { 5030 push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, globalObject. prototype(), DontDelete | ReadOnly | DontEnum);\n");5030 push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(), DontDelete | ReadOnly | DontEnum);\n"); 5031 5031 } elsif ($interface->isCallback) { 5032 5032 push(@$outputArray, " UNUSED_PARAM(globalObject);\n"); 5033 5033 } else { 5034 push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);\n");5034 push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);\n"); 5035 5035 } 5036 5036 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r196690 r197648 94 94 template<> void JSTestActiveDOMObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 95 95 { 96 putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);96 putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 97 97 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestActiveDOMObject"))), ReadOnly | DontEnum); 98 98 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 130 130 } 131 131 132 JSObject* JSTestActiveDOMObject:: getPrototype(VM& vm, JSGlobalObject* globalObject)132 JSObject* JSTestActiveDOMObject::prototype(VM& vm, JSGlobalObject* globalObject) 133 133 { 134 134 return getDOMPrototype<JSTestActiveDOMObject>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestActiveDOMObject* toWrapped(JSC::JSValue); 45 45 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp
r197642 r197648 72 72 template<> void JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 73 73 { 74 putDirect(vm, vm.propertyNames->prototype, JSTestClassWithJSBuiltinConstructor:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);74 putDirect(vm, vm.propertyNames->prototype, JSTestClassWithJSBuiltinConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 75 75 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestClassWithJSBuiltinConstructor"))), ReadOnly | DontEnum); 76 76 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 111 111 } 112 112 113 JSObject* JSTestClassWithJSBuiltinConstructor:: getPrototype(VM& vm, JSGlobalObject* globalObject)113 JSObject* JSTestClassWithJSBuiltinConstructor::prototype(VM& vm, JSGlobalObject* globalObject) 114 114 { 115 115 return getDOMPrototype<JSTestClassWithJSBuiltinConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestClassWithJSBuiltinConstructor* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
r196396 r197648 76 76 template<> void JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 77 77 { 78 putDirect(vm, vm.propertyNames->prototype, JSTestCustomConstructorWithNoInterfaceObject:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);78 putDirect(vm, vm.propertyNames->prototype, JSTestCustomConstructorWithNoInterfaceObject::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 79 79 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomConstructorWithNoInterfaceObject"))), ReadOnly | DontEnum); 80 80 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 110 110 } 111 111 112 JSObject* JSTestCustomConstructorWithNoInterfaceObject:: getPrototype(VM& vm, JSGlobalObject* globalObject)112 JSObject* JSTestCustomConstructorWithNoInterfaceObject::prototype(VM& vm, JSGlobalObject* globalObject) 113 113 { 114 114 return getDOMPrototype<JSTestCustomConstructorWithNoInterfaceObject>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestCustomConstructorWithNoInterfaceObject* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r196563 r197648 78 78 template<> void JSTestCustomNamedGetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 79 79 { 80 putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetter:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);80 putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetter::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 81 81 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomNamedGetter"))), ReadOnly | DontEnum); 82 82 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 113 113 } 114 114 115 JSObject* JSTestCustomNamedGetter:: getPrototype(VM& vm, JSGlobalObject* globalObject)115 JSObject* JSTestCustomNamedGetter::prototype(VM& vm, JSGlobalObject* globalObject) 116 116 { 117 117 return getDOMPrototype<JSTestCustomNamedGetter>(vm, globalObject); … … 130 130 if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot)) 131 131 return true; 132 JSValue proto = thisObject-> prototype();132 JSValue proto = thisObject->getPrototypeDirect(); 133 133 if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName)) 134 134 return false; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestCustomNamedGetter* toWrapped(JSC::JSValue); 45 45 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
r196407 r197648 117 117 template<> void JSTestEventConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 118 118 { 119 putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);119 putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 120 120 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventConstructor"))), ReadOnly | DontEnum); 121 121 putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum); … … 153 153 } 154 154 155 JSObject* JSTestEventConstructor:: getPrototype(VM& vm, JSGlobalObject* globalObject)155 JSObject* JSTestEventConstructor::prototype(VM& vm, JSGlobalObject* globalObject) 156 156 { 157 157 return getDOMPrototype<JSTestEventConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
r196476 r197648 43 43 44 44 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 45 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);45 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 46 46 static TestEventConstructor* toWrapped(JSC::JSValue); 47 47 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r196563 r197648 79 79 template<> void JSTestEventTargetConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 80 80 { 81 putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);81 putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 82 82 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventTarget"))), ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 111 111 JSObject* JSTestEventTarget::createPrototype(VM& vm, JSGlobalObject* globalObject) 112 112 { 113 return JSTestEventTargetPrototype::create(vm, globalObject, JSTestEventTargetPrototype::createStructure(vm, globalObject, JSEventTarget:: getPrototype(vm, globalObject)));114 } 115 116 JSObject* JSTestEventTarget:: getPrototype(VM& vm, JSGlobalObject* globalObject)113 return JSTestEventTargetPrototype::create(vm, globalObject, JSTestEventTargetPrototype::createStructure(vm, globalObject, JSEventTarget::prototype(vm, globalObject))); 114 } 115 116 JSObject* JSTestEventTarget::prototype(VM& vm, JSGlobalObject* globalObject) 117 117 { 118 118 return getDOMPrototype<JSTestEventTarget>(vm, globalObject); … … 132 132 if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot)) 133 133 return true; 134 JSValue proto = thisObject-> prototype();134 JSValue proto = thisObject->getPrototypeDirect(); 135 135 if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName)) 136 136 return false; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
r196466 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestEventTarget* toWrapped(JSC::JSValue); 45 45 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
r196396 r197648 88 88 template<> void JSTestExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 89 89 { 90 putDirect(vm, vm.propertyNames->prototype, JSTestException:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);90 putDirect(vm, vm.propertyNames->prototype, JSTestException::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 91 91 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestException"))), ReadOnly | DontEnum); 92 92 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 122 122 } 123 123 124 JSObject* JSTestException:: getPrototype(VM& vm, JSGlobalObject* globalObject)124 JSObject* JSTestException::prototype(VM& vm, JSGlobalObject* globalObject) 125 125 { 126 126 return getDOMPrototype<JSTestException>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
r196476 r197648 42 42 43 43 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 44 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);44 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 45 45 static TestException* toWrapped(JSC::JSValue); 46 46 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
r196396 r197648 71 71 template<> void JSTestGenerateIsReachableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 72 72 { 73 putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);73 putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 74 74 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGenerateIsReachable"))), ReadOnly | DontEnum); 75 75 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 105 105 } 106 106 107 JSObject* JSTestGenerateIsReachable:: getPrototype(VM& vm, JSGlobalObject* globalObject)107 JSObject* JSTestGenerateIsReachable::prototype(VM& vm, JSGlobalObject* globalObject) 108 108 { 109 109 return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestGenerateIsReachable* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r197614 r197648 254 254 template<> void JSTestInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 255 255 { 256 putDirect(vm, vm.propertyNames->prototype, JSTestInterface:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);256 putDirect(vm, vm.propertyNames->prototype, JSTestInterface::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 257 257 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterface"))), ReadOnly | DontEnum); 258 258 putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum); … … 400 400 } 401 401 402 JSObject* JSTestInterface:: getPrototype(VM& vm, JSGlobalObject* globalObject)402 JSObject* JSTestInterface::prototype(VM& vm, JSGlobalObject* globalObject) 403 403 { 404 404 return getDOMPrototype<JSTestInterface>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r196476 r197648 43 43 44 44 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 45 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);45 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 46 46 static TestInterface* toWrapped(JSC::JSValue); 47 47 static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
r196563 r197648 80 80 template<> void JSTestJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 81 81 { 82 putDirect(vm, vm.propertyNames->prototype, JSTestJSBuiltinConstructor:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);82 putDirect(vm, vm.propertyNames->prototype, JSTestJSBuiltinConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestJSBuiltinConstructor"))), ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 122 122 } 123 123 124 JSObject* JSTestJSBuiltinConstructor:: getPrototype(VM& vm, JSGlobalObject* globalObject)124 JSObject* JSTestJSBuiltinConstructor::prototype(VM& vm, JSGlobalObject* globalObject) 125 125 { 126 126 return getDOMPrototype<JSTestJSBuiltinConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
r196423 r197648 39 39 40 40 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 41 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);41 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 42 42 static void destroy(JSC::JSCell*); 43 43 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r196563 r197648 78 78 template<> void JSTestMediaQueryListListenerConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 79 79 { 80 putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);80 putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 81 81 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestMediaQueryListListener"))), ReadOnly | DontEnum); 82 82 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 113 113 } 114 114 115 JSObject* JSTestMediaQueryListListener:: getPrototype(VM& vm, JSGlobalObject* globalObject)115 JSObject* JSTestMediaQueryListListener::prototype(VM& vm, JSGlobalObject* globalObject) 116 116 { 117 117 return getDOMPrototype<JSTestMediaQueryListListener>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestMediaQueryListListener* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
r196396 r197648 74 74 template<> void JSTestNamedConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 75 75 { 76 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);76 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 77 77 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedConstructor"))), ReadOnly | DontEnum); 78 78 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 112 112 template<> void JSTestNamedConstructorNamedConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 113 113 { 114 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);114 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 115 115 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Audio"))), ReadOnly | DontEnum); 116 116 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 146 146 } 147 147 148 JSObject* JSTestNamedConstructor:: getPrototype(VM& vm, JSGlobalObject* globalObject)148 JSObject* JSTestNamedConstructor::prototype(VM& vm, JSGlobalObject* globalObject) 149 149 { 150 150 return getDOMPrototype<JSTestNamedConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestNamedConstructor* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r196392 r197648 82 82 template<> void JSTestNodeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 83 83 { 84 putDirect(vm, vm.propertyNames->prototype, JSTestNode:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);84 putDirect(vm, vm.propertyNames->prototype, JSTestNode::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 85 85 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNode"))), ReadOnly | DontEnum); 86 86 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 114 114 JSObject* JSTestNode::createPrototype(VM& vm, JSGlobalObject* globalObject) 115 115 { 116 return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm, globalObject, JSNode:: getPrototype(vm, globalObject)));116 return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm, globalObject, JSNode::prototype(vm, globalObject))); 117 117 } 118 118 119 JSObject* JSTestNode:: getPrototype(VM& vm, JSGlobalObject* globalObject)119 JSObject* JSTestNode::prototype(VM& vm, JSGlobalObject* globalObject) 120 120 { 121 121 return getDOMPrototype<JSTestNode>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
r196423 r197648 40 40 41 41 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 42 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);42 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 43 43 44 44 DECLARE_INFO; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
r196563 r197648 94 94 template<> void JSTestNondeterministicConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 95 95 { 96 putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministic:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);96 putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministic::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 97 97 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNondeterministic"))), ReadOnly | DontEnum); 98 98 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 134 134 } 135 135 136 JSObject* JSTestNondeterministic:: getPrototype(VM& vm, JSGlobalObject* globalObject)136 JSObject* JSTestNondeterministic::prototype(VM& vm, JSGlobalObject* globalObject) 137 137 { 138 138 return getDOMPrototype<JSTestNondeterministic>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestNondeterministic* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r197611 r197648 506 506 template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 507 507 { 508 putDirect(vm, vm.propertyNames->prototype, JSTestObj:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);508 putDirect(vm, vm.propertyNames->prototype, JSTestObj::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 509 509 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum); 510 510 putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum); … … 763 763 } 764 764 765 JSObject* JSTestObj:: getPrototype(VM& vm, JSGlobalObject* globalObject)765 JSObject* JSTestObj::prototype(VM& vm, JSGlobalObject* globalObject) 766 766 { 767 767 return getDOMPrototype<JSTestObj>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r197060 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestObj* toWrapped(JSC::JSValue); 45 45 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
r196396 r197648 151 151 template<> void JSTestOverloadedConstructorsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 152 152 { 153 putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);153 putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 154 154 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructors"))), ReadOnly | DontEnum); 155 155 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 185 185 } 186 186 187 JSObject* JSTestOverloadedConstructors:: getPrototype(VM& vm, JSGlobalObject* globalObject)187 JSObject* JSTestOverloadedConstructors::prototype(VM& vm, JSGlobalObject* globalObject) 188 188 { 189 189 return getDOMPrototype<JSTestOverloadedConstructors>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestOverloadedConstructors* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r196563 r197648 80 80 template<> void JSTestOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 81 81 { 82 putDirect(vm, vm.propertyNames->prototype, JSTestOverrideBuiltins:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);82 putDirect(vm, vm.propertyNames->prototype, JSTestOverrideBuiltins::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverrideBuiltins"))), ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 115 115 } 116 116 117 JSObject* JSTestOverrideBuiltins:: getPrototype(VM& vm, JSGlobalObject* globalObject)117 JSObject* JSTestOverrideBuiltins::prototype(VM& vm, JSGlobalObject* globalObject) 118 118 { 119 119 return getDOMPrototype<JSTestOverrideBuiltins>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestOverrideBuiltins* toWrapped(JSC::JSValue); 45 45 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r196396 r197648 85 85 template<> void JSTestSerializedScriptValueInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 86 86 { 87 putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);87 putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 88 88 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializedScriptValueInterface"))), ReadOnly | DontEnum); 89 89 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 124 124 } 125 125 126 JSObject* JSTestSerializedScriptValueInterface:: getPrototype(VM& vm, JSGlobalObject* globalObject)126 JSObject* JSTestSerializedScriptValueInterface::prototype(VM& vm, JSGlobalObject* globalObject) 127 127 { 128 128 return getDOMPrototype<JSTestSerializedScriptValueInterface>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
r196476 r197648 43 43 44 44 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 45 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);45 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 46 46 static TestSerializedScriptValueInterface* toWrapped(JSC::JSValue); 47 47 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r196563 r197648 147 147 template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 148 148 { 149 putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);149 putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 150 150 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum); 151 151 putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum); … … 198 198 } 199 199 200 JSObject* JSTestTypedefs:: getPrototype(VM& vm, JSGlobalObject* globalObject)200 JSObject* JSTestTypedefs::prototype(VM& vm, JSGlobalObject* globalObject) 201 201 { 202 202 return getDOMPrototype<JSTestTypedefs>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static TestTypedefs* toWrapped(JSC::JSValue); 45 45 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
r196396 r197648 74 74 template<> void JSattributeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 75 75 { 76 putDirect(vm, vm.propertyNames->prototype, JSattribute:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);76 putDirect(vm, vm.propertyNames->prototype, JSattribute::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 77 77 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("attribute"))), ReadOnly | DontEnum); 78 78 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 109 109 } 110 110 111 JSObject* JSattribute:: getPrototype(VM& vm, JSGlobalObject* globalObject)111 JSObject* JSattribute::prototype(VM& vm, JSGlobalObject* globalObject) 112 112 { 113 113 return getDOMPrototype<JSattribute>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h
r196476 r197648 42 42 43 43 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 44 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);44 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 45 45 static attribute* toWrapped(JSC::JSValue); 46 46 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
r196396 r197648 71 71 template<> void JSreadonlyConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 72 72 { 73 putDirect(vm, vm.propertyNames->prototype, JSreadonly:: getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);73 putDirect(vm, vm.propertyNames->prototype, JSreadonly::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); 74 74 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("readonly"))), ReadOnly | DontEnum); 75 75 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 105 105 } 106 106 107 JSObject* JSreadonly:: getPrototype(VM& vm, JSGlobalObject* globalObject)107 JSObject* JSreadonly::prototype(VM& vm, JSGlobalObject* globalObject) 108 108 { 109 109 return getDOMPrototype<JSreadonly>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
r196476 r197648 41 41 42 42 static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*); 43 static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);43 static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*); 44 44 static readonly* toWrapped(JSC::JSValue); 45 45 static void destroy(JSC::JSCell*);
Note: See TracChangeset
for help on using the changeset viewer.