Title: [111223] trunk/Source/_javascript_Core
- Revision
- 111223
- Author
- [email protected]
- Date
- 2012-03-19 12:59:03 -0700 (Mon, 19 Mar 2012)
Log Message
Unreviewed - revent a couple of files accidentally committed.
* runtime/Arguments.cpp:
(JSC::Arguments::defineOwnProperty):
* runtime/JSFunction.cpp:
(JSC::JSFunction::defineOwnProperty):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (111222 => 111223)
--- trunk/Source/_javascript_Core/ChangeLog 2012-03-19 19:58:44 UTC (rev 111222)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-03-19 19:59:03 UTC (rev 111223)
@@ -1,3 +1,12 @@
+2012-03-19 Gavin Barraclough <[email protected]>
+
+ Unreviewed - revent a couple of files accidentally committed.
+
+ * runtime/Arguments.cpp:
+ (JSC::Arguments::defineOwnProperty):
+ * runtime/JSFunction.cpp:
+ (JSC::JSFunction::defineOwnProperty):
+
2012-03-19 Jessie Berlin <[email protected]>
Another Windows build fix after r111129.
Modified: trunk/Source/_javascript_Core/runtime/Arguments.cpp (111222 => 111223)
--- trunk/Source/_javascript_Core/runtime/Arguments.cpp 2012-03-19 19:58:44 UTC (rev 111222)
+++ trunk/Source/_javascript_Core/runtime/Arguments.cpp 2012-03-19 19:59:03 UTC (rev 111223)
@@ -306,7 +306,6 @@
bool isArrayIndex;
unsigned i = propertyName.toArrayIndex(isArrayIndex);
if (isArrayIndex && i < thisObject->d->numArguments) {
- object->putDirect(exec->globalData(), propertyName, thisObject->argument(i).get(), 0);
if (!Base::defineOwnProperty(object, exec, propertyName, descriptor, shouldThrow))
return false;
@@ -332,16 +331,35 @@
thisObject->d->deletedArguments[i] = true;
}
}
+
return true;
}
if (propertyName == exec->propertyNames().length && !thisObject->d->overrodeLength) {
- thisObject->putDirect(exec->globalData(), propertyName, jsNumber(thisObject->d->numArguments), DontEnum);
thisObject->d->overrodeLength = true;
- } else if (propertyName == exec->propertyNames().callee && !thisObject->d->overrodeCallee) {
- thisObject->putDirect(exec->globalData(), propertyName, thisObject->d->callee.get(), DontEnum);
+ if (!descriptor.isAccessorDescriptor()) {
+ if (!descriptor.value())
+ descriptor.setValue(jsNumber(thisObject->d->numArguments));
+ if (!descriptor.configurablePresent())
+ descriptor.setConfigurable(true);
+ }
+ if (!descriptor.configurablePresent())
+ descriptor.setConfigurable(true);
+ }
+
+ if (propertyName == exec->propertyNames().callee && !thisObject->d->overrodeCallee) {
thisObject->d->overrodeCallee = true;
- } else if (propertyName == exec->propertyNames().caller && thisObject->d->isStrictMode)
+ if (!descriptor.isAccessorDescriptor()) {
+ if (!descriptor.value())
+ descriptor.setValue(thisObject->d->callee.get());
+ if (!descriptor.configurablePresent())
+ descriptor.setConfigurable(true);
+ }
+ if (!descriptor.configurablePresent())
+ descriptor.setConfigurable(true);
+ }
+
+ if (propertyName == exec->propertyNames().caller && thisObject->d->isStrictMode)
thisObject->createStrictModeCallerIfNecessary(exec);
return Base::defineOwnProperty(object, exec, propertyName, descriptor, shouldThrow);
Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (111222 => 111223)
--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2012-03-19 19:58:44 UTC (rev 111222)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp 2012-03-19 19:59:03 UTC (rev 111223)
@@ -371,6 +371,11 @@
PropertySlot slot;
thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot);
} else if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length || propertyName == exec->propertyNames().caller) {
+ if (!object->isExtensible()) {
+ if (throwException)
+ throwError(exec, createTypeError(exec, "Attempting to define property on object that is not extensible."));
+ return false;
+ }
if (descriptor.configurablePresent() && descriptor.configurable()) {
if (throwException)
throwError(exec, createTypeError(exec, "Attempting to configurable attribute of unconfigurable property."));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes