Changeset 197648 in webkit


Ignore:
Timestamp:
Mar 6, 2016 5:00:33 PM (8 years ago)
Author:
sbarati@apple.com
Message:

GetPrototypeOf? should be a fully virtual method in the method table
https://bugs.webkit.org/show_bug.cgi?id=155002

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch makes us more consistent with how the ES6 specification models the
GetPrototypeOf? trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.GetPrototypeOf?. This patch
still allows directly accessing the prototype for situations where this
is the desired behavior. This is equivalent to getting the internal
Prototype? field as described in the specification.

  • API/JSObjectRef.cpp:

(JSObjectGetPrototype):
(JSObjectSetPrototype):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOfCustom):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jsc.cpp:

(functionCreateProxy):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayPrototype.cpp:

(JSC::speciesConstructArray):

  • runtime/ClassInfo.h:
  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncBind):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeGetterCompare):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • runtime/JSBoundFunction.cpp:

(JSC::hasInstanceBoundFunction):
(JSC::getBoundFunctionStructure):
(JSC::JSBoundFunction::create):

  • runtime/JSBoundFunction.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSCell.cpp:

(JSC::JSCell::setPrototype):
(JSC::JSCell::getPrototype):

  • runtime/JSCell.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::hasLegacyProfiler):
(JSC::lastInPrototypeChain):
(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::finishCreation):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::globalFuncProtoGetter):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnPropertySlot):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::getPrototype):
(JSC::JSObject::defaultHasInstance):
(JSC::objectPrivateFuncInstanceOf):
(JSC::JSObject::getPropertyNames):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::getGenericPropertyNames):

  • runtime/JSObject.h:

(JSC::JSObject::finishCreation):
(JSC::JSObject::JSObject):
(JSC::JSObject::getPrototypeDirect):
(JSC::JSObject::getPrototype):
(JSC::JSObject::getOwnNonIndexPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::prototype): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::constructTypedArrayView):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
(JSC::objectConstructorGetPrototypeOf):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncIsPrototypeOf):

  • runtime/ProxyObject.cpp:

(JSC::performProxyGet):
(JSC::ProxyObject::performSetPrototype):

  • runtime/StructureInlines.h:

(JSC::Structure::isValid):

  • tests/stress/proxy-has-property.js:

(assert.let.h1.has):
(assert.let.h2.has):
(assert):

Source/WebCore:

Change ::getPrototype(.) to ::prototype(.) in various places to prevent
a naming conflict with JSC.

No new tests because no new functionality was added.

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSImageConstructor.cpp:

(WebCore::JSImageConstructor::initializeProperties):
(WebCore::JSImageConstructor::prototypeForStructure):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorHelperMethods):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
(WebCore::JSTestActiveDOMObject::createPrototype):
(WebCore::JSTestActiveDOMObject::prototype):
(WebCore::JSTestActiveDOMObject::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:

(WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):
(WebCore::JSTestClassWithJSBuiltinConstructor::createPrototype):
(WebCore::JSTestClassWithJSBuiltinConstructor::prototype):
(WebCore::JSTestClassWithJSBuiltinConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::prototype):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:

(WebCore::JSTestCustomNamedGetterConstructor::initializeProperties):
(WebCore::JSTestCustomNamedGetter::createPrototype):
(WebCore::JSTestCustomNamedGetter::prototype):
(WebCore::JSTestCustomNamedGetter::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::JSTestEventConstructorConstructor::initializeProperties):
(WebCore::JSTestEventConstructor::createPrototype):
(WebCore::JSTestEventConstructor::prototype):
(WebCore::JSTestEventConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::JSTestEventTargetConstructor::initializeProperties):
(WebCore::JSTestEventTarget::createPrototype):
(WebCore::JSTestEventTarget::prototype):
(WebCore::JSTestEventTarget::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.cpp:

(WebCore::JSTestExceptionConstructor::initializeProperties):
(WebCore::JSTestException::createPrototype):
(WebCore::JSTestException::prototype):
(WebCore::JSTestException::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
(WebCore::JSTestGenerateIsReachable::createPrototype):
(WebCore::JSTestGenerateIsReachable::prototype):
(WebCore::JSTestGenerateIsReachable::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::JSTestInterfaceConstructor::initializeProperties):
(WebCore::JSTestInterface::createPrototype):
(WebCore::JSTestInterface::prototype):
(WebCore::JSTestInterface::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:

(WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
(WebCore::JSTestJSBuiltinConstructor::createPrototype):
(WebCore::JSTestJSBuiltinConstructor::prototype):
(WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:

(WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
(WebCore::JSTestMediaQueryListListener::createPrototype):
(WebCore::JSTestMediaQueryListListener::prototype):
(WebCore::JSTestMediaQueryListListener::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::JSTestNamedConstructorConstructor::initializeProperties):
(WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
(WebCore::JSTestNamedConstructor::createPrototype):
(WebCore::JSTestNamedConstructor::prototype):
(WebCore::JSTestNamedConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNodeConstructor::initializeProperties):
(WebCore::JSTestNode::createPrototype):
(WebCore::JSTestNode::prototype):
(WebCore::JSTestNode::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:

(WebCore::JSTestNondeterministicConstructor::initializeProperties):
(WebCore::JSTestNondeterministic::createPrototype):
(WebCore::JSTestNondeterministic::prototype):
(WebCore::JSTestNondeterministic::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestNondeterministic.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjConstructor::initializeProperties):
(WebCore::JSTestObj::createPrototype):
(WebCore::JSTestObj::prototype):
(WebCore::JSTestObj::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
(WebCore::JSTestOverloadedConstructors::createPrototype):
(WebCore::JSTestOverloadedConstructors::prototype):
(WebCore::JSTestOverloadedConstructors::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:

(WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
(WebCore::JSTestOverrideBuiltins::createPrototype):
(WebCore::JSTestOverrideBuiltins::prototype):
(WebCore::JSTestOverrideBuiltins::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
(WebCore::JSTestSerializedScriptValueInterface::createPrototype):
(WebCore::JSTestSerializedScriptValueInterface::prototype):
(WebCore::JSTestSerializedScriptValueInterface::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::JSTestTypedefsConstructor::initializeProperties):
(WebCore::JSTestTypedefs::createPrototype):
(WebCore::JSTestTypedefs::prototype):
(WebCore::JSTestTypedefs::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/JS/JSattribute.cpp:

(WebCore::JSattributeConstructor::initializeProperties):
(WebCore::JSattribute::createPrototype):
(WebCore::JSattribute::prototype):
(WebCore::JSattribute::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSattribute.h:
  • bindings/scripts/test/JS/JSreadonly.cpp:

(WebCore::JSreadonlyConstructor::initializeProperties):
(WebCore::JSreadonly::createPrototype):
(WebCore::JSreadonly::prototype):
(WebCore::JSreadonly::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSreadonly.h:
Location:
trunk/Source
Files:
90 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSObjectRef.cpp

    r197646 r197648  
    268268    JSLockHolder locker(exec);
    269269
    270     JSObject* jsObject = toJS(object);
    271     return toRef(exec, jsObject->prototype());
     270    JSObject* jsObject = toJS(object); 
     271    return toRef(exec, jsObject->getPrototypeDirect());
    272272}
    273273
  • trunk/Source/JavaScriptCore/ChangeLog

    r197646 r197648  
     12016-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
    11212016-03-06  Commit Queue  <commit-queue@webkit.org>
    2122
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r197646 r197648  
    13931393}
    13941394
     1395size_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
    13951404void JIT_OPERATION operationProcessTypeProfilerLogDFG(ExecState* exec)
    13961405{
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.h

    r197646 r197648  
    156156int64_t JIT_OPERATION operationConvertDoubleToInt52(double);
    157157
     158size_t JIT_OPERATION operationDefaultHasInstance(ExecState*, JSCell* value, JSCell* proto);
     159
    158160void JIT_OPERATION operationProcessTypeProfilerLogDFG(ExecState*) WTF_INTERNAL;
    159161
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r197646 r197648  
    27412741    // Walk up the prototype chain of the value (in scratchReg), comparing to prototypeReg.
    27422742    MacroAssembler::Label loop(&m_jit);
     2743    MacroAssembler::Jump performDefaultHasInstance = m_jit.branch8(MacroAssembler::Equal,
     2744        MacroAssembler::Address(scratchReg, JSCell::typeInfoTypeOffset()), TrustedImm32(ProxyObjectType));
    27432745    m_jit.emitLoadStructure(scratchReg, scratchReg, scratch2Reg);
    27442746    m_jit.loadPtr(MacroAssembler::Address(scratchReg, Structure::prototypeOffset() + CellPayloadOffset), scratchReg);
     
    27562758    m_jit.move(MacroAssembler::TrustedImm32(0), scratchReg);
    27572759#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());
    27592772   
    27602773    isInstance.link(&m_jit);
     
    27652778#endif
    27662779   
    2767     putResult.link(&m_jit);
     2780    doneJumps.link(&m_jit);
    27682781}
    27692782
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r197646 r197648  
    59485948        LBasicBlock notYetInstance = FTL_NEW_BLOCK(m_out, ("InstanceOf not yet instance"));
    59495949        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"));
    59505952       
    59515953        LValue condition;
     
    59655967        m_out.jump(loop);
    59665968       
    5967         m_out.appendTo(loop, notYetInstance);
     5969        m_out.appendTo(loop, loadPrototypeDirect);
    59685970        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);
    59695977        LValue structure = loadStructure(value);
    59705978        LValue currentPrototype = m_out.load64(structure, m_heaps.Structure_prototype);
     
    59745982            unsure(continuation), unsure(notYetInstance));
    59755983       
    5976         m_out.appendTo(notYetInstance, continuation);
     5984        m_out.appendTo(notYetInstance, defaultHasInstanceSlow);
    59775985        ValueFromBlock notInstanceResult = m_out.anchor(m_out.booleanFalse);
    59785986        m_out.addIncomingToPhi(value, m_out.anchor(currentPrototype));
    59795987        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);
    59805996       
    59815997        m_out.appendTo(continuation, lastNext);
    59825998        setBoolean(
    5983             m_out.phi(m_out.boolean, notCellResult, isInstanceResult, notInstanceResult));
     5999            m_out.phi(m_out.boolean, notCellResult, isInstanceResult, notInstanceResult, defaultHasInstanceResult));
    59846000    }
    59856001
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r197646 r197648  
    154154    Label loop(this);
    155155
     156    addSlowCase(branch8(Equal, Address(regT2, JSCell::typeInfoTypeOffset()), TrustedImm32(ProxyObjectType)));
     157
    156158    // Load the prototype of the object in regT2.  If this is equal to regT1 - WIN!
    157159    // Otherwise, check if we've hit null - if we have then drop out of the loop, if not go again.
     
    857859    linkSlowCaseIfNotJSCell(iter, value);
    858860    linkSlowCaseIfNotJSCell(iter, proto);
     861    linkSlowCase(iter);
    859862    linkSlowCase(iter);
    860863    emitGetVirtualRegister(value, regT0);
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r197646 r197648  
    234234    Label loop(this);
    235235
     236    addSlowCase(branch8(Equal, Address(regT2, JSCell::typeInfoTypeOffset()), TrustedImm32(ProxyObjectType)));
     237
    236238    // Load the prototype of the cell in regT2.  If this is equal to regT1 - WIN!
    237239    // Otherwise, check if we've hit null - if we have then drop out of the loop, if not go again.
     
    263265    linkSlowCaseIfNotJSCell(iter, value);
    264266    linkSlowCaseIfNotJSCell(iter, proto);
     267    linkSlowCase(iter);
    265268    linkSlowCase(iter);
    266269
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r197646 r197648  
    17801780    JSValue proto = JSValue::decode(encodedProto);
    17811781   
    1782     ASSERT(!value.isObject() || !proto.isObject());
    1783 
    17841782    bool result = JSObject::defaultHasInstance(exec, value, proto);
    17851783    return JSValue::encode(jsBoolean(result));
  • trunk/Source/JavaScriptCore/jsc.cpp

    r197646 r197648  
    12291229        return JSValue::encode(jsUndefined());
    12301230    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());
    12321232    JSProxy* proxy = JSProxy::create(exec->vm(), structure, jsTarget);
    12331233    return JSValue::encode(proxy);
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r197646 r197648  
    527527    JSValue value = LLINT_OP_C(2).jsValue();
    528528    JSValue proto = LLINT_OP_C(3).jsValue();
    529     ASSERT(!value.isObject() || !proto.isObject());
    530529    LLINT_RETURN(jsBoolean(JSObject::defaultHasInstance(exec, value, proto)));
    531530}
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r197646 r197648  
    17071707    dispatch(4)
    17081708
     1709_llint_op_instanceof:
     1710    traceExecution()
     1711    callSlowPath(_llint_slow_path_instanceof)
     1712    dispatch(4)
     1713
    17091714
    17101715# Lastly, make sure that we can link even though we don't support all opcodes.
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r197646 r197648  
    12051205.opOverrideshasInstanceValueNotDefault:
    12061206    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], t0
    1213     loadi 4[PC], t3
    1214     loadConstantOrVariablePayload(t0, CellTag, t1, .opInstanceofSlow)
    1215     bbb JSCell::m_type[t1], ObjectType, .opInstanceofSlow
    1216     loadi 8[PC], t0
    1217     loadConstantOrVariablePayload(t0, CellTag, t2, .opInstanceofSlow)
    1218    
    1219     # Register state: t1 = prototype, t2 = value
    1220     move 1, t0
    1221 .opInstanceofLoop:
    1222     loadp JSCell::m_structureID[t2], t2
    1223     loadi Structure::m_prototype + PayloadOffset[t2], t2
    1224     bpeq t2, t1, .opInstanceofDone
    1225     btinz t2, .opInstanceofLoop
    1226 
    1227     move 0, t0
    1228 .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)
    12351207    dispatch(4)
    12361208
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r197646 r197648  
    10941094
    10951095
    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, .opInstanceofSlow
    1102     loadisFromInstruction(2, t0)
    1103     loadConstantOrVariableCell(t0, t2, .opInstanceofSlow)
    1104    
    1105     # Register state: t1 = prototype, t2 = value
    1106     move 1, t0
    1107 .opInstanceofLoop:
    1108     loadStructureAndClobberFirstArg(t2, t3)
    1109     loadq Structure::m_prototype[t3], t2
    1110     bqeq t2, t1, .opInstanceofDone
    1111     btqz t2, tagMask, .opInstanceofLoop
    1112 
    1113     move 0, t0
    1114 .opInstanceofDone:
    1115     orq ValueFalse, t0
    1116     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 
    11241096_llint_op_instanceof_custom:
    11251097    traceExecution()
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r197646 r197648  
    185185        // We need prototype check for subclasses of Array, which are Array objects but have a different prototype by default.
    186186        if (LIKELY(!thisObject->hasCustomProperties()
    187             && thisObject->globalObject()->arrayPrototype() == thisObject->prototype()
     187            && thisObject->globalObject()->arrayPrototype() == thisObject->getPrototypeDirect()
    188188            && !thisObject->globalObject()->arrayPrototype()->didChangeConstructorOrSpeciesProperties()))
    189189            return std::make_pair(SpeciesConstructResult::FastPath, nullptr);
  • trunk/Source/JavaScriptCore/runtime/ClassInfo.h

    r197646 r197648  
    112112    typedef bool (*SetPrototypeFunctionPtr)(JSObject*, ExecState*, JSValue, bool shouldThrowIfCantSet);
    113113    SetPrototypeFunctionPtr setPrototype;
     114
     115    typedef JSValue (*GetPrototypeFunctionPtr)(JSObject*, ExecState*);
     116    GetPrototypeFunctionPtr getPrototype;
    114117
    115118    typedef void (*DumpToStreamFunctionPtr)(const JSCell*, PrintStream&);
     
    167170        &ClassName::isExtensible, \
    168171        &ClassName::setPrototype, \
     172        &ClassName::getPrototype, \
    169173        &ClassName::dumpToStream, \
    170174        &ClassName::estimatedSize \
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r197646 r197648  
    169169
    170170    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)));
    172172}
    173173
  • trunk/Source/JavaScriptCore/runtime/IntlCollatorPrototype.cpp

    r197646 r197648  
    130130
    131131        // 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());
    133135        // d. Set collator.[[boundCompare]] to bc.
    134136        collator->setBoundCompare(vm, boundCompare);
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp

    r197646 r197648  
    135135
    136136        // 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());
    138140        // d. Set dtf.[[boundFormat]] to bf.
    139141        dtf->setBoundFormat(vm, boundFormat);
  • trunk/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp

    r197646 r197648  
    123123
    124124        // 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());
    126128        // d. Set nf.[[boundFormat]] to bf.
    127129        nf->setBoundFormat(vm, boundFormat);
  • trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp

    r197646 r197648  
    8888}
    8989
    90 inline Structure* getBoundFunctionStructure(VM& vm, JSGlobalObject* globalObject, JSObject* targetFunction)
     90inline Structure* getBoundFunctionStructure(VM& vm, ExecState* exec, JSGlobalObject* globalObject, JSObject* targetFunction)
    9191{
    92     JSValue prototype = targetFunction->structure(vm)->storedPrototype();
     92    JSValue prototype = targetFunction->getPrototype(vm, exec);
     93    if (UNLIKELY(vm.exception()))
     94        return nullptr;
    9395    JSFunction* targetJSFunction = jsDynamicCast<JSFunction*>(targetFunction);
    9496
     
    118120}
    119121
    120 JSBoundFunction* JSBoundFunction::create(VM& vm, JSGlobalObject* globalObject, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int length, const String& name)
     122JSBoundFunction* JSBoundFunction::create(VM& vm, ExecState* exec, JSGlobalObject* globalObject, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int length, const String& name)
    121123{
    122124    ConstructData constructData;
     
    124126    bool canConstruct = constructType != ConstructType::None;
    125127    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;
    127131    JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(vm.heap)) JSBoundFunction(vm, globalObject, structure, targetFunction, boundThis, boundArgs);
    128132
  • trunk/Source/JavaScriptCore/runtime/JSBoundFunction.h

    r197646 r197648  
    4141    const static unsigned StructureFlags = ~ImplementsDefaultHasInstance & Base::StructureFlags;
    4242
    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&);
    4444   
    4545    static bool customHasInstance(JSObject*, ExecState*, JSValue);
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp

    r197646 r197648  
    144144    if (propertyName != exec->propertyNames().underscoreProto) {
    145145        for (; !obj->structure()->hasReadOnlyOrGetterSetterPropertiesExcludingProto(); obj = asObject(prototype)) {
    146             prototype = obj->prototype();
     146            prototype = obj->getPrototypeDirect();
    147147            if (prototype.isNull()) {
    148148                if (slot.isStrictMode())
     
    179179        }
    180180
    181         prototype = obj->prototype();
     181        prototype = obj->getPrototype(vm, exec);
     182        if (vm.exception())
     183            return;
    182184        if (prototype.isNull())
    183185            break;
  • trunk/Source/JavaScriptCore/runtime/JSCell.cpp

    r197646 r197648  
    286286}
    287287
     288JSValue JSCell::getPrototype(JSObject*, ExecState*)
     289{
     290    RELEASE_ASSERT_NOT_REACHED();
     291}
     292
    288293} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r197646 r197648  
    210210    static NO_RETURN_DUE_TO_CRASH bool isExtensible(JSObject*, ExecState*);
    211211    static NO_RETURN_DUE_TO_CRASH bool setPrototype(JSObject*, ExecState*, JSValue, bool);
     212    static NO_RETURN_DUE_TO_CRASH JSValue getPrototype(JSObject*, ExecState*);
    212213
    213214    static String className(const JSObject*);
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r197646 r197648  
    614614    }
    615615
    616     resetPrototype(vm, prototype());
     616    resetPrototype(vm, getPrototypeDirect());
    617617}
    618618
     
    670670{
    671671    JSObject* o = object;
    672     while (o->prototype().isObject())
    673         o = asObject(o->prototype());
     672    while (o->getPrototypeDirect().isObject())
     673        o = asObject(o->getPrototypeDirect());
    674674    return o;
    675675}
     
    727727        }
    728728       
    729         JSValue prototypeValue = current->prototype();
     729        JSValue prototypeValue = current->getPrototypeDirect();
    730730        if (prototypeValue.isNull())
    731731            break;
     
    786786{
    787787    return !hasIndexedProperties(m_objectPrototype->indexingType())
    788         && m_objectPrototype->prototype().isNull();
     788        && m_objectPrototype->getPrototypeDirect().isNull();
    789789}
    790790
     
    792792{
    793793    return !hasIndexedProperties(m_arrayPrototype->indexingType())
    794         && m_arrayPrototype->prototype() == m_objectPrototype.get()
     794        && m_arrayPrototype->getPrototypeDirect() == m_objectPrototype.get()
    795795        && objectPrototypeIsSane();
    796796}
     
    799799{
    800800    return !hasIndexedProperties(m_stringPrototype->indexingType())
    801         && m_stringPrototype->prototype() == m_objectPrototype.get()
     801        && m_stringPrototype->getPrototypeDirect() == m_objectPrototype.get()
    802802        && objectPrototypeIsSane();
    803803}
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r197646 r197648  
    380380        m_runtimeFlags = m_globalObjectMethodTable->javaScriptRuntimeFlags(this);
    381381        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));
    383383    }
    384384
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r197646 r197648  
    785785class GlobalFuncProtoGetterFunctor {
    786786public:
    787     GlobalFuncProtoGetterFunctor(JSObject* thisObject)
    788         : m_hasSkippedFirstFrame(false)
     787    GlobalFuncProtoGetterFunctor(ExecState* exec, JSObject* thisObject)
     788        : m_exec(exec)
     789        , m_hasSkippedFirstFrame(false)
    789790        , m_thisObject(thisObject)
    790791        , m_result(JSValue::encode(jsUndefined()))
     
    802803
    803804        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));
    805806
    806807        return StackVisitor::Done;
     
    808809
    809810private:
     811    ExecState* m_exec;
    810812    bool m_hasSkippedFirstFrame;
    811813    JSObject* m_thisObject;
     
    823825        return JSValue::encode(exec->thisValue().synthesizePrototype(exec));
    824826
    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.
    826831    exec->iterate(functor);
    827832    return functor.result();
  • trunk/Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp

    r197646 r197648  
    7777    // lexical environment object getter properties or a prototype.
    7878    ASSERT(!thisObject->hasGetterSetterProperties());
    79     ASSERT(thisObject->prototype().isNull());
     79    ASSERT(thisObject->getPrototypeDirect().isNull());
    8080    return false;
    8181}
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r197646 r197648  
    273273    String prototypeFunctionName;
    274274    ExecState* exec = object->globalObject()->globalExec();
    275     PropertySlot slot(object->structure()->storedPrototype(), PropertySlot::InternalMethodType::VMInquiry);
     275    PropertySlot slot(object->getPrototypeDirect(), PropertySlot::InternalMethodType::VMInquiry);
    276276    PropertyName constructor(exec->propertyNames().constructor);
    277277    if (object->getPropertySlot(exec, constructor, slot)) {
     
    431431        }
    432432        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
    433436            ProxyObject* proxy = jsCast<ProxyObject*>(obj);
    434437            proxy->ProxyObject::put(proxy, exec, propertyName, value, slot);
    435438            return;
    436439        }
    437         JSValue prototype = obj->prototype();
     440        JSValue prototype = obj->getPrototypeDirect();
    438441        if (prototype.isNull())
    439442            break;
     
    12021205    ASSERT(methodTable(vm)->toThis(this, exec, NotStrictMode) == this);
    12031206
    1204     if (this->prototype() == prototype)
     1207    if (this->getPrototypeDirect() == prototype)
    12051208        return true;
    12061209
     
    12161219
    12171220    JSValue nextPrototype = prototype;
     1221    MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype;
    12181222    while (nextPrototype && nextPrototype.isObject()) {
    12191223        if (nextPrototype == this) {
     
    12221226            return false;
    12231227        }
    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();
    12251231    }
    12261232    setPrototypeDirect(vm, prototype);
     
    12311237{
    12321238    return object->setPrototypeWithCycleCheck(exec->vm(), exec, prototype, shouldThrowIfCantSet);
     1239}
     1240
     1241JSValue JSObject::getPrototype(JSObject* object, ExecState*)
     1242{
     1243    return object->getPrototypeDirect();
    12331244}
    12341245
     
    15731584    }
    15741585
     1586    VM& vm = exec->vm();
    15751587    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);
    15771595        if (proto == object)
    15781596            return true;
    15791597    }
    1580     return false;
     1598    ASSERT_NOT_REACHED();
    15811599}
    15821600
     
    15911609void JSObject::getPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
    15921610{
    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 
    16001611    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);
    16021623    while(1) {
    16031624        if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) {
     
    16061627        }
    16071628        prototype->methodTable(vm)->getOwnPropertyNames(prototype, exec, propertyNames, mode);
    1608         if (UNLIKELY(exec->hadException()))
     1629        if (UNLIKELY(vm.exception()))
    16091630            return;
    1610         JSValue nextProto = prototype->prototype();
     1631        nextProto = prototype->getPrototype(vm, exec);
     1632        if (UNLIKELY(vm.exception()))
     1633            return;
    16111634        if (nextProto.isNull())
    16121635            break;
     
    20282051        }
    20292052       
    2030         JSValue prototypeValue = current->prototype();
     2053        JSValue prototypeValue = current->getPrototypeDirect();
    20312054        if (prototypeValue.isNull())
    20322055            return false;
     
    20382061bool JSObject::attemptToInterceptPutByIndexOnHole(ExecState* exec, unsigned i, JSValue value, bool shouldThrow)
    20392062{
    2040     JSValue prototypeValue = prototype();
     2063    JSValue prototypeValue = getPrototypeDirect();
    20412064    if (prototypeValue.isNull())
    20422065        return false;
     
    30303053    VM& vm = exec->vm();
    30313054    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);
    30393065    while (true) {
    30403066        if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) {
     
    30453071        if (UNLIKELY(exec->hadException()))
    30463072            return;
    3047         JSValue nextProto = prototype->prototype();
     3073        nextProto = prototype->getPrototype(vm, exec);
     3074        if (UNLIKELY(vm.exception()))
     3075            return;
    30483076        if (nextProto.isNull())
    30493077            break;
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r197646 r197648  
    104104    JS_EXPORT_PRIVATE static String calculatedClassName(JSObject*);
    105105
    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
    107119    // This sets the prototype without checking for cycles and without
    108120    // doing dynamic dispatch on [[SetPrototypeOf]] operation in the specification.
     
    760772        Base::finishCreation(vm);
    761773        ASSERT(inherits(info()));
    762         ASSERT(prototype().isNull() || Heap::heap(this) == Heap::heap(prototype()));
     774        ASSERT(getPrototypeDirect().isNull() || Heap::heap(this) == Heap::heap(getPrototypeDirect()));
    763775        ASSERT(structure()->isObject());
    764776        ASSERT(classInfo());
     
    11251137}
    11261138
    1127 inline JSValue JSObject::prototype() const
     1139inline JSValue JSObject::getPrototypeDirect() const
    11281140{
    11291141    return structure()->storedPrototype();
     1142}
     1143
     1144inline 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);
    11301151}
    11311152
     
    12051226            return object->getNonIndexPropertySlot(exec, propertyName, slot);
    12061227        }
     1228        ASSERT(object->type() != ProxyObjectType);
    12071229        Structure& structure = *structureIDTable.get(object->structureID());
    12081230        if (object->getOwnNonIndexPropertySlot(vm, structure, propertyName, slot))
     
    12241246    auto& structureIDTable = vm.heap.structureIDTable();
    12251247    JSObject* object = this;
     1248    MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype;
    12261249    while (true) {
    12271250        Structure& structure = *structureIDTable.get(object->structureID());
    12281251        if (structure.classInfo()->methodTable.getOwnPropertySlotByIndex(object, exec, propertyName, slot))
    12291252            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        }
    12311263        if (!prototype.isObject())
    12321264            return false;
     
    12431275    auto& structureIDTable = vm.heap.structureIDTable();
    12441276    JSObject* object = this;
     1277    MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype;
    12451278    while (true) {
    12461279        Structure& structure = *structureIDTable.get(object->structureID());
     
    12481281            if (object->getOwnNonIndexPropertySlot(vm, structure, propertyName, slot))
    12491282                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        }
    12531297        if (!prototype.isObject())
    12541298            return false;
  • trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h

    r197646 r197648  
    4343            return false;
    4444
    45         prototype = obj->prototype();
     45        prototype = obj->getPrototypeDirect();
    4646        if (prototype.isNull())
    4747            return true;
  • trunk/Source/JavaScriptCore/runtime/JSProxy.cpp

    r197646 r197648  
    4848    ASSERT_ARG(globalObject, globalObject);
    4949    m_target.set(vm, this, globalObject);
    50     setPrototypeDirect(vm, globalObject->prototype());
     50    setPrototypeDirect(vm, globalObject->getPrototypeDirect());
    5151
    5252    PrototypeMap& prototypeMap = vm.prototypeMap;
  • trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp

    r197646 r197648  
    7878        return JSValue::encode(throwTypeError(exec, "new.target passed to TypedArray is not a valid constructor."));
    7979
    80     for (; !value.isNull(); value = jsCast<JSObject*>(value)->prototype()) {
     80    for (; !value.isNull(); value = jsCast<JSObject*>(value)->getPrototypeDirect()) {
    8181        if (jsDynamicCast<JSTypedArrayViewConstructor*>(value))
    8282            return JSValue::encode(throwTypeError(exec, "Unable to find TypedArray constructor that inherits from TypedArray."));
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r197646 r197648  
    151151class ObjectConstructorGetPrototypeOfFunctor {
    152152public:
    153     ObjectConstructorGetPrototypeOfFunctor(JSObject* object)
    154         : m_hasSkippedFirstFrame(false)
     153    ObjectConstructorGetPrototypeOfFunctor(ExecState* exec, JSObject* object)
     154        : m_exec(exec)
     155        , m_hasSkippedFirstFrame(false)
    155156        , m_object(object)
    156157        , m_result(jsUndefined())
     
    168169
    169170        if (m_object->allowsAccessFrom(visitor->callFrame()))
    170             m_result = m_object->prototype();
     171            m_result = m_object->getPrototype(m_exec->vm(), m_exec);
    171172        return StackVisitor::Done;
    172173    }
    173174
    174175private:
     176    ExecState* m_exec;
    175177    bool m_hasSkippedFirstFrame;
    176178    JSObject* m_object;
     
    180182JSValue objectConstructorGetPrototypeOf(ExecState* exec, JSObject* object)
    181183{
    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.
    183188    exec->iterate(functor);
    184189    return functor.result();
  • trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp

    r197646 r197648  
    102102        return JSValue::encode(jsBoolean(false));
    103103
    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());
    105108
    106109    while (true) {
     
    109112        if (v == thisObj)
    110113            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());
    112117    }
    113118}
  • trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp

    r197646 r197648  
    9191    // https://bugs.webkit.org/show_bug.cgi?id=154320
    9292    while (true) {
    93         if (LIKELY(proxyObjectAsObject->inherits(ProxyObject::info())))
     93        if (LIKELY(proxyObjectAsObject->type() == ProxyObjectType))
    9494            break;
    9595
    96         Structure& structure = *vm.heap.structureIDTable().get(proxyObjectAsObject->structureID());
    97         JSValue prototype = structure.storedPrototype();
     96        JSValue prototype = proxyObjectAsObject->getPrototypeDirect();
    9897        RELEASE_ASSERT(prototype.isObject());
    9998        proxyObjectAsObject = asObject(prototype);
     
    10071006        return true;
    10081007
    1009     JSValue targetPrototype = target->prototype();
     1008    JSValue targetPrototype = target->getPrototype(vm, exec);
     1009    if (vm.exception())
     1010        return false;
    10101011    if (!sameValue(exec, prototype, targetPrototype)) {
    10111012        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  
    211211            return false;
    212212        ++cachedStructure;
    213         prototype = asObject(prototype)->prototype();
     213        prototype = asObject(prototype)->getPrototypeDirect();
    214214    }
    215215    return prototype.isNull() && !*cachedStructure;
  • trunk/Source/JavaScriptCore/tests/stress/proxy-has-property.js

    r197646 r197648  
    368368    }
    369369}
     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  
     12016-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
    11522016-03-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    2153
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r197628 r197648  
    310310        if (classInfo == JSDOMWindowShell::info())
    311311            return jsCast<JSDOMWindowShell*>(object)->window();
    312         value = object->prototype();
     312        value = object->getPrototypeDirect();
    313313    }
    314314    return 0;
  • trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r196722 r197648  
    170170    // to frames that happen to have names corresponding to properties on the prototype.
    171171    // This seems to only serve to leak some information cross-origin.
    172     JSValue proto = thisObject->prototype();
     172    JSValue proto = thisObject->getPrototypeDirect();
    173173    if (proto.isObject() && asObject(proto)->getPropertySlot(exec, propertyName, slot)) {
    174174        thisObject->printErrorMessage(errorMessage);
     
    193193static bool jsDOMWindowGetOwnPropertySlotNamedItemGetter(JSDOMWindow* thisObject, Frame& frame, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    194194{
    195     JSValue proto = thisObject->prototype();
     195    JSValue proto = thisObject->getPrototypeDirect();
    196196    if (proto.isObject() && asObject(proto)->hasProperty(exec, propertyName))
    197197        return false;
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp

    r196563 r197648  
    8686    JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this);
    8787    prototype->structure()->setGlobalObject(vm, jsDOMWindow);
    88     prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::getPrototype(vm, jsDOMWindow));
     88    prototype->structure()->setPrototypeWithoutTransition(vm, JSEventTarget::prototype(vm, jsDOMWindow));
    8989    setWindow(vm, jsDOMWindow);
    9090    ASSERT(jsDOMWindow->globalObject() == jsDOMWindow);
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp

    r196392 r197648  
    3737template<> void JSImageConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    3838{
    39     putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::getPrototype(vm, &globalObject), None);
     39    putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::prototype(vm, &globalObject), None);
    4040}
    4141
  • trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h

    r196423 r197648  
    5151                return true;
    5252
    53             JSC::JSValue proto = element->prototype();
     53            JSC::JSValue proto = element->getPrototypeDirect();
    5454            if (proto.isObject() && JSC::jsCast<JSC::JSObject*>(asObject(proto))->hasProperty(exec, propertyName))
    5555                return false;
  • trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp

    r196745 r197648  
    6262    static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties");
    6363
    64     JSValue prototype = thisObject->prototype();
     64    JSValue prototype = thisObject->getPrototypeDirect();
    6565    if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot))
    6666        return Base::deleteProperty(thisObject, exec, propertyName);
     
    107107    static_assert(!hasStaticPropertyTable, "This function does not handle static instance properties");
    108108
    109     JSValue prototype = this->prototype();
     109    JSValue prototype = this->getPrototypeDirect();
    110110    if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot))
    111111        return false;
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp

    r196594 r197648  
    9696        ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper);
    9797        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()));
    9999        dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get());
    100100    }
    101101    ASSERT(m_workerGlobalScopeWrapper->globalObject() == m_workerGlobalScopeWrapper);
    102     ASSERT(asObject(m_workerGlobalScopeWrapper->prototype())->globalObject() == m_workerGlobalScopeWrapper);
     102    ASSERT(asObject(m_workerGlobalScopeWrapper->getPrototypeDirect())->globalObject() == m_workerGlobalScopeWrapper);
    103103
    104104    m_consoleClient = std::make_unique<WorkerConsoleClient>(*m_workerGlobalScope);
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r197642 r197648  
    409409    # https://heycam.github.io/webidl/#dfn-named-properties-object
    410410    my $prototypeCheck = sub {
    411         push(@getOwnPropertySlotImpl, "    ${namespaceMaybe}JSValue proto = thisObject->prototype();\n");
     411        push(@getOwnPropertySlotImpl, "    ${namespaceMaybe}JSValue proto = thisObject->getPrototypeDirect();\n");
    412412        push(@getOwnPropertySlotImpl, "    if (proto.isObject() && jsCast<${namespaceMaybe}JSObject*>(proto)->hasProperty(state, propertyName))\n");
    413413        push(@getOwnPropertySlotImpl, "        return false;\n\n");
     
    982982    unless (IsDOMGlobalObject($interface)) {
    983983        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");
    985985    }
    986986
     
    21962196        push(@implContent, "{\n");
    21972197        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");
    21992199        } else {
    22002200            my $prototype = $interface->isException ? "errorPrototype" : "objectPrototype";
     
    22032203        push(@implContent, "}\n\n");
    22042204
    2205         push(@implContent, "JSObject* ${className}::getPrototype(VM& vm, JSGlobalObject* globalObject)\n");
     2205        push(@implContent, "JSObject* ${className}::prototype(VM& vm, JSGlobalObject* globalObject)\n");
    22062206        push(@implContent, "{\n");
    22072207        push(@implContent, "    return getDOMPrototype<${className}>(vm, globalObject);\n");
     
    23342334                    # Fallback to trying to searching the prototype chain for compatibility reasons.
    23352335                    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");
    23372337                    push(@implContent, "            if ((castedThis = " . GetCastingHelperForThisObject($interface) . "(thisObject)))\n");
    23382338                    push(@implContent, "                break;\n");
     
    26372637                    # Fallback to trying to searching the prototype chain for compatibility reasons.
    26382638                    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");
    26402640                    push(@implContent, "            if ((castedThis = " . GetCastingHelperForThisObject($interface) . "(thisObject)))\n");
    26412641                    push(@implContent, "                break;\n");
     
    50285028    # https://heycam.github.io/webidl/#interface-prototype-object
    50295029    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");
    50315031    } elsif ($interface->isCallback) {
    50325032        push(@$outputArray, "    UNUSED_PARAM(globalObject);\n");
    50335033    } 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");
    50355035    }
    50365036
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r196690 r197648  
    9494template<> void JSTestActiveDOMObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9595{
    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);
    9797    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestActiveDOMObject"))), ReadOnly | DontEnum);
    9898    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    130130}
    131131
    132 JSObject* JSTestActiveDOMObject::getPrototype(VM& vm, JSGlobalObject* globalObject)
     132JSObject* JSTestActiveDOMObject::prototype(VM& vm, JSGlobalObject* globalObject)
    133133{
    134134    return getDOMPrototype<JSTestActiveDOMObject>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestActiveDOMObject* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp

    r197642 r197648  
    7272template<> void JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7373{
    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);
    7575    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestClassWithJSBuiltinConstructor"))), ReadOnly | DontEnum);
    7676    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    111111}
    112112
    113 JSObject* JSTestClassWithJSBuiltinConstructor::getPrototype(VM& vm, JSGlobalObject* globalObject)
     113JSObject* JSTestClassWithJSBuiltinConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
    114114{
    115115    return getDOMPrototype<JSTestClassWithJSBuiltinConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestClassWithJSBuiltinConstructor* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp

    r196396 r197648  
    7676template<> void JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7777{
    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);
    7979    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomConstructorWithNoInterfaceObject"))), ReadOnly | DontEnum);
    8080    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    110110}
    111111
    112 JSObject* JSTestCustomConstructorWithNoInterfaceObject::getPrototype(VM& vm, JSGlobalObject* globalObject)
     112JSObject* JSTestCustomConstructorWithNoInterfaceObject::prototype(VM& vm, JSGlobalObject* globalObject)
    113113{
    114114    return getDOMPrototype<JSTestCustomConstructorWithNoInterfaceObject>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestCustomConstructorWithNoInterfaceObject* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp

    r196563 r197648  
    7878template<> void JSTestCustomNamedGetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7979{
    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);
    8181    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomNamedGetter"))), ReadOnly | DontEnum);
    8282    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    113113}
    114114
    115 JSObject* JSTestCustomNamedGetter::getPrototype(VM& vm, JSGlobalObject* globalObject)
     115JSObject* JSTestCustomNamedGetter::prototype(VM& vm, JSGlobalObject* globalObject)
    116116{
    117117    return getDOMPrototype<JSTestCustomNamedGetter>(vm, globalObject);
     
    130130    if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))
    131131        return true;
    132     JSValue proto = thisObject->prototype();
     132    JSValue proto = thisObject->getPrototypeDirect();
    133133    if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName))
    134134        return false;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestCustomNamedGetter* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r196407 r197648  
    117117template<> void JSTestEventConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    118118{
    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);
    120120    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventConstructor"))), ReadOnly | DontEnum);
    121121    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     
    153153}
    154154
    155 JSObject* JSTestEventConstructor::getPrototype(VM& vm, JSGlobalObject* globalObject)
     155JSObject* JSTestEventConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
    156156{
    157157    return getDOMPrototype<JSTestEventConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h

    r196476 r197648  
    4343
    4444    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*);
    4646    static TestEventConstructor* toWrapped(JSC::JSValue);
    4747    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp

    r196563 r197648  
    7979template<> void JSTestEventTargetConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8080{
    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);
    8282    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventTarget"))), ReadOnly | DontEnum);
    8383    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    111111JSObject* JSTestEventTarget::createPrototype(VM& vm, JSGlobalObject* globalObject)
    112112{
    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
     116JSObject* JSTestEventTarget::prototype(VM& vm, JSGlobalObject* globalObject)
    117117{
    118118    return getDOMPrototype<JSTestEventTarget>(vm, globalObject);
     
    132132    if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))
    133133        return true;
    134     JSValue proto = thisObject->prototype();
     134    JSValue proto = thisObject->getPrototypeDirect();
    135135    if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName))
    136136        return false;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h

    r196466 r197648  
    4141
    4242    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*);
    4444    static TestEventTarget* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp

    r196396 r197648  
    8888template<> void JSTestExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8989{
    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);
    9191    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestException"))), ReadOnly | DontEnum);
    9292    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    122122}
    123123
    124 JSObject* JSTestException::getPrototype(VM& vm, JSGlobalObject* globalObject)
     124JSObject* JSTestException::prototype(VM& vm, JSGlobalObject* globalObject)
    125125{
    126126    return getDOMPrototype<JSTestException>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h

    r196476 r197648  
    4242
    4343    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*);
    4545    static TestException* toWrapped(JSC::JSValue);
    4646    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp

    r196396 r197648  
    7171template<> void JSTestGenerateIsReachableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7272{
    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);
    7474    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGenerateIsReachable"))), ReadOnly | DontEnum);
    7575    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    105105}
    106106
    107 JSObject* JSTestGenerateIsReachable::getPrototype(VM& vm, JSGlobalObject* globalObject)
     107JSObject* JSTestGenerateIsReachable::prototype(VM& vm, JSGlobalObject* globalObject)
    108108{
    109109    return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestGenerateIsReachable* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r197614 r197648  
    254254template<> void JSTestInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    255255{
    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);
    257257    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterface"))), ReadOnly | DontEnum);
    258258    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     
    400400}
    401401
    402 JSObject* JSTestInterface::getPrototype(VM& vm, JSGlobalObject* globalObject)
     402JSObject* JSTestInterface::prototype(VM& vm, JSGlobalObject* globalObject)
    403403{
    404404    return getDOMPrototype<JSTestInterface>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h

    r196476 r197648  
    4343
    4444    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*);
    4646    static TestInterface* toWrapped(JSC::JSValue);
    4747    static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp

    r196563 r197648  
    8080template<> void JSTestJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8181{
    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);
    8383    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestJSBuiltinConstructor"))), ReadOnly | DontEnum);
    8484    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    122122}
    123123
    124 JSObject* JSTestJSBuiltinConstructor::getPrototype(VM& vm, JSGlobalObject* globalObject)
     124JSObject* JSTestJSBuiltinConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
    125125{
    126126    return getDOMPrototype<JSTestJSBuiltinConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h

    r196423 r197648  
    3939
    4040    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*);
    4242    static void destroy(JSC::JSCell*);
    4343
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp

    r196563 r197648  
    7878template<> void JSTestMediaQueryListListenerConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7979{
    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);
    8181    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestMediaQueryListListener"))), ReadOnly | DontEnum);
    8282    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    113113}
    114114
    115 JSObject* JSTestMediaQueryListListener::getPrototype(VM& vm, JSGlobalObject* globalObject)
     115JSObject* JSTestMediaQueryListListener::prototype(VM& vm, JSGlobalObject* globalObject)
    116116{
    117117    return getDOMPrototype<JSTestMediaQueryListListener>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestMediaQueryListListener* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp

    r196396 r197648  
    7474template<> void JSTestNamedConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7575{
    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);
    7777    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedConstructor"))), ReadOnly | DontEnum);
    7878    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    112112template<> void JSTestNamedConstructorNamedConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    113113{
    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);
    115115    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Audio"))), ReadOnly | DontEnum);
    116116    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    146146}
    147147
    148 JSObject* JSTestNamedConstructor::getPrototype(VM& vm, JSGlobalObject* globalObject)
     148JSObject* JSTestNamedConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
    149149{
    150150    return getDOMPrototype<JSTestNamedConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestNamedConstructor* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r196392 r197648  
    8282template<> void JSTestNodeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8383{
    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);
    8585    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNode"))), ReadOnly | DontEnum);
    8686    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    114114JSObject* JSTestNode::createPrototype(VM& vm, JSGlobalObject* globalObject)
    115115{
    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)));
    117117}
    118118
    119 JSObject* JSTestNode::getPrototype(VM& vm, JSGlobalObject* globalObject)
     119JSObject* JSTestNode::prototype(VM& vm, JSGlobalObject* globalObject)
    120120{
    121121    return getDOMPrototype<JSTestNode>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h

    r196423 r197648  
    4040
    4141    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*);
    4343
    4444    DECLARE_INFO;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp

    r196563 r197648  
    9494template<> void JSTestNondeterministicConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9595{
    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);
    9797    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNondeterministic"))), ReadOnly | DontEnum);
    9898    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    134134}
    135135
    136 JSObject* JSTestNondeterministic::getPrototype(VM& vm, JSGlobalObject* globalObject)
     136JSObject* JSTestNondeterministic::prototype(VM& vm, JSGlobalObject* globalObject)
    137137{
    138138    return getDOMPrototype<JSTestNondeterministic>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestNondeterministic* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r197611 r197648  
    506506template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    507507{
    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);
    509509    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum);
    510510    putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
     
    763763}
    764764
    765 JSObject* JSTestObj::getPrototype(VM& vm, JSGlobalObject* globalObject)
     765JSObject* JSTestObj::prototype(VM& vm, JSGlobalObject* globalObject)
    766766{
    767767    return getDOMPrototype<JSTestObj>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r197060 r197648  
    4141
    4242    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*);
    4444    static TestObj* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp

    r196396 r197648  
    151151template<> void JSTestOverloadedConstructorsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    152152{
    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);
    154154    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructors"))), ReadOnly | DontEnum);
    155155    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    185185}
    186186
    187 JSObject* JSTestOverloadedConstructors::getPrototype(VM& vm, JSGlobalObject* globalObject)
     187JSObject* JSTestOverloadedConstructors::prototype(VM& vm, JSGlobalObject* globalObject)
    188188{
    189189    return getDOMPrototype<JSTestOverloadedConstructors>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestOverloadedConstructors* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp

    r196563 r197648  
    8080template<> void JSTestOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8181{
    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);
    8383    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverrideBuiltins"))), ReadOnly | DontEnum);
    8484    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    115115}
    116116
    117 JSObject* JSTestOverrideBuiltins::getPrototype(VM& vm, JSGlobalObject* globalObject)
     117JSObject* JSTestOverrideBuiltins::prototype(VM& vm, JSGlobalObject* globalObject)
    118118{
    119119    return getDOMPrototype<JSTestOverrideBuiltins>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestOverrideBuiltins* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r196396 r197648  
    8585template<> void JSTestSerializedScriptValueInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8686{
    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);
    8888    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializedScriptValueInterface"))), ReadOnly | DontEnum);
    8989    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    124124}
    125125
    126 JSObject* JSTestSerializedScriptValueInterface::getPrototype(VM& vm, JSGlobalObject* globalObject)
     126JSObject* JSTestSerializedScriptValueInterface::prototype(VM& vm, JSGlobalObject* globalObject)
    127127{
    128128    return getDOMPrototype<JSTestSerializedScriptValueInterface>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h

    r196476 r197648  
    4343
    4444    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*);
    4646    static TestSerializedScriptValueInterface* toWrapped(JSC::JSValue);
    4747    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r196563 r197648  
    147147template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    148148{
    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);
    150150    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum);
    151151    putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
     
    198198}
    199199
    200 JSObject* JSTestTypedefs::getPrototype(VM& vm, JSGlobalObject* globalObject)
     200JSObject* JSTestTypedefs::prototype(VM& vm, JSGlobalObject* globalObject)
    201201{
    202202    return getDOMPrototype<JSTestTypedefs>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static TestTypedefs* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp

    r196396 r197648  
    7474template<> void JSattributeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7575{
    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);
    7777    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("attribute"))), ReadOnly | DontEnum);
    7878    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    109109}
    110110
    111 JSObject* JSattribute::getPrototype(VM& vm, JSGlobalObject* globalObject)
     111JSObject* JSattribute::prototype(VM& vm, JSGlobalObject* globalObject)
    112112{
    113113    return getDOMPrototype<JSattribute>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h

    r196476 r197648  
    4242
    4343    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*);
    4545    static attribute* toWrapped(JSC::JSValue);
    4646    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp

    r196396 r197648  
    7171template<> void JSreadonlyConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7272{
    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);
    7474    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("readonly"))), ReadOnly | DontEnum);
    7575    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    105105}
    106106
    107 JSObject* JSreadonly::getPrototype(VM& vm, JSGlobalObject* globalObject)
     107JSObject* JSreadonly::prototype(VM& vm, JSGlobalObject* globalObject)
    108108{
    109109    return getDOMPrototype<JSreadonly>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h

    r196476 r197648  
    4141
    4242    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*);
    4444    static readonly* toWrapped(JSC::JSValue);
    4545    static void destroy(JSC::JSCell*);
Note: See TracChangeset for help on using the changeset viewer.