Index: src/js/v8natives.js |
diff --git a/src/js/v8natives.js b/src/js/v8natives.js |
index 06c315b8906c2df04135c4f9b849095bd69ee64e..6ffd074138695b3d038d065db9dd365c03cf1cbc 100644 |
--- a/src/js/v8natives.js |
+++ b/src/js/v8natives.js |
@@ -1010,44 +1010,15 @@ function ObjectCreate(proto, properties) { |
// ES5 section 15.2.3.6. |
function ObjectDefineProperty(obj, p, attributes) { |
- // The new pure-C++ implementation doesn't support Proxies yet, nor O.o. |
+ // The new pure-C++ implementation doesn't support O.o. |
// TODO(jkummerow): Implement missing features and remove fallback path. |
- if (%_IsJSProxy(obj) || %IsObserved(obj)) { |
+ if (%IsObserved(obj)) { |
if (!IS_SPEC_OBJECT(obj)) { |
throw MakeTypeError(kCalledOnNonObject, "Object.defineProperty"); |
} |
var name = TO_NAME(p); |
- if (%_IsJSProxy(obj)) { |
- // Clone the attributes object for protection. |
- // TODO(rossberg): not spec'ed yet, so not sure if this should involve |
- // non-own properties as it does (or non-enumerable ones, as it doesn't?). |
- var attributesClone = { __proto__: null }; |
- for (var a in attributes) { |
- attributesClone[a] = attributes[a]; |
- } |
- DefineProxyProperty(obj, name, attributesClone, true); |
- // The following would implement the spec as in the current proposal, |
- // but after recent comments on es-discuss, is most likely obsolete. |
- /* |
- var defineObj = FromGenericPropertyDescriptor(desc); |
- var names = ObjectGetOwnPropertyNames(attributes); |
- var standardNames = |
- {value: 0, writable: 0, get: 0, set: 0, enumerable: 0, configurable: 0}; |
- for (var i = 0; i < names.length; i++) { |
- var N = names[i]; |
- if (!(%HasOwnProperty(standardNames, N))) { |
- var attr = GetOwnPropertyJS(attributes, N); |
- DefineOwnProperty(descObj, N, attr, true); |
- } |
- } |
- // This is really confusing the types, but it is what the proxies spec |
- // currently requires: |
- desc = descObj; |
- */ |
- } else { |
- var desc = ToPropertyDescriptor(attributes); |
- DefineOwnProperty(obj, name, desc, true); |
- } |
+ var desc = ToPropertyDescriptor(attributes); |
+ DefineOwnProperty(obj, name, desc, true); |
return obj; |
} |
return %ObjectDefineProperty(obj, p, attributes); |
@@ -1078,9 +1049,9 @@ function GetOwnEnumerablePropertyNames(object) { |
// ES5 section 15.2.3.7. |
function ObjectDefineProperties(obj, properties) { |
- // The new pure-C++ implementation doesn't support Proxies yet, nor O.o. |
+ // The new pure-C++ implementation doesn't support O.o. |
// TODO(jkummerow): Implement missing features and remove fallback path. |
- if (%_IsJSProxy(obj) || %_IsJSProxy(properties) || %IsObserved(obj)) { |
+ if (%IsObserved(obj)) { |
if (!IS_SPEC_OBJECT(obj)) { |
throw MakeTypeError(kCalledOnNonObject, "Object.defineProperties"); |
} |