Ignore:
Timestamp:
Feb 13, 2012, 1:28:44 AM (14 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=78434
Unreviewed - temporarily reverting r107498 will I fix a couple of testcases.

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::::parseFunctionInfo):

  • runtime/ClassInfo.h:

(MethodTable):
(JSC):

  • runtime/JSCell.cpp:

(JSC):

  • runtime/JSCell.h:

(JSCell):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::reset):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC):

  • runtime/JSGlobalObjectFunctions.h:

(JSC):

  • runtime/JSObject.cpp:

(JSC::JSObject::put):
(JSC):
(JSC::JSObject::putDirectAccessor):
(JSC::JSObject::defineOwnProperty):

  • runtime/JSObject.h:

(JSC::JSObject::inlineGetOwnPropertySlot):
(JSC::JSValue::get):

  • runtime/JSString.cpp:

(JSC::JSString::getOwnPropertySlot):

  • runtime/JSValue.h:

(JSValue):

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorGetPrototypeOf):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):

  • runtime/Structure.h:

(JSC::Structure::setHasGetterSetterProperties):
(Structure):

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore):

  • bindings/js/JSDOMWindowBase.h:

(JSDOMWindowBase):

LayoutTests:

  • fast/js/Object-getOwnPropertyNames-expected.txt:
  • fast/js/cyclic-prototypes-expected.txt:
  • fast/js/parser-syntax-check-expected.txt:
  • fast/js/preventExtensions-expected.txt:
  • fast/js/prototypes-expected.txt:
  • fast/js/script-tests/Object-getOwnPropertyNames.js:
  • fast/js/script-tests/cyclic-prototypes.js:
  • fast/js/script-tests/parser-syntax-check.js:
  • fast/js/script-tests/preventExtensions.js:
  • fast/js/script-tests/prototypes.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r107498 r107544  
    715715}
    716716
    717 EncodedJSValue JSC_HOST_CALL globalFuncProtoGetter(ExecState* exec)
    718 {
    719     if (!exec->thisValue().isObject())
    720         return JSValue::encode(exec->thisValue().synthesizePrototype(exec));
    721 
    722     JSObject* thisObject = asObject(exec->thisValue());
    723     if (!thisObject->methodTable()->allowsAccessFrom(thisObject, exec))
    724         return JSValue::encode(jsUndefined());
    725 
    726     return JSValue::encode(thisObject->prototype());
    727 }
    728 
    729 EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState* exec)
    730 {
    731     JSValue value = exec->argument(0);
    732 
    733     // Setting __proto__ of a primitive should have no effect.
    734     if (!exec->thisValue().isObject())
    735         return JSValue::encode(jsUndefined());
    736 
    737     JSObject* thisObject = asObject(exec->thisValue());
    738     if (!thisObject->methodTable()->allowsAccessFrom(thisObject, exec))
    739         return JSValue::encode(jsUndefined());
    740 
    741     // Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla.
    742     if (!value.isObject() && !value.isNull())
    743         return JSValue::encode(jsUndefined());
    744 
    745     if (!thisObject->isExtensible())
    746         return JSValue::encode(jsUndefined());
    747 
    748     if (!thisObject->setPrototypeWithCycleCheck(exec->globalData(), value))
    749         throwError(exec, createError(exec, "cyclic __proto__ value"));
    750 
    751     return JSValue::encode(jsUndefined());
    752 }
    753 
    754717} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.