| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index 168f97b91add2c5ac868bffb6842b56104f850ad..95a7193b8ae7490902bf493785999adfaa7a4919 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -1089,19 +1089,24 @@ function GetOwnEnumerablePropertyNames(object) {
|
|
|
| // ES5 section 15.2.3.7.
|
| function ObjectDefineProperties(obj, properties) {
|
| - if (!IS_SPEC_OBJECT(obj)) {
|
| - throw MakeTypeError(kCalledOnNonObject, "Object.defineProperties");
|
| - }
|
| - var props = TO_OBJECT(properties);
|
| - var names = GetOwnEnumerablePropertyNames(props);
|
| - var descriptors = new InternalArray();
|
| - for (var i = 0; i < names.length; i++) {
|
| - descriptors.push(ToPropertyDescriptor(props[names[i]]));
|
| - }
|
| - for (var i = 0; i < names.length; i++) {
|
| - DefineOwnProperty(obj, names[i], descriptors[i], true);
|
| + // The new pure-C++ implementation doesn't support Proxies yet, nor O.o.
|
| + // TODO(jkummerow): Implement missing features and remove fallback path.
|
| + if (%_IsJSProxy(obj) || %_IsJSProxy(properties) || %IsObserved(obj)) {
|
| + if (!IS_SPEC_OBJECT(obj)) {
|
| + throw MakeTypeError(kCalledOnNonObject, "Object.defineProperties");
|
| + }
|
| + var props = TO_OBJECT(properties);
|
| + var names = GetOwnEnumerablePropertyNames(props);
|
| + var descriptors = new InternalArray();
|
| + for (var i = 0; i < names.length; i++) {
|
| + descriptors.push(ToPropertyDescriptor(props[names[i]]));
|
| + }
|
| + for (var i = 0; i < names.length; i++) {
|
| + DefineOwnProperty(obj, names[i], descriptors[i], true);
|
| + }
|
| + return obj;
|
| }
|
| - return obj;
|
| + return %ObjectDefineProperties(obj, properties);
|
| }
|
|
|
|
|
|
|