Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: src/v8natives.js

Issue 548833002: [es6] implement Object.assign (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 7fb317db7e9e2860ab4cd5c6e53da54d4a4c3de5..00455bef76fe1b4eea48619fc33dd031d62b5e42 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -259,16 +259,21 @@ function ObjectIsPrototypeOf(V) {
// ECMA-262 - 15.2.4.6
-function ObjectPropertyIsEnumerable(V) {
+function ObjectPropertyIsEnumerableJS(O, V) {
var P = ToName(V);
- if (%_IsJSProxy(this)) {
+ if (%_IsJSProxy(O)) {
// TODO(rossberg): adjust once there is a story for symbols vs proxies.
if (IS_SYMBOL(V)) return false;
- var desc = GetOwnPropertyJS(this, P);
+ var desc = GetOwnPropertyJS(O, P);
return IS_UNDEFINED(desc) ? false : desc.isEnumerable();
}
- return %IsPropertyEnumerable(ToObject(this), P);
+ return %IsPropertyEnumerable(ToObject(O), P);
+}
+
+
+function ObjectPropertyIsEnumerable(V) {
+ return ObjectPropertyIsEnumerableJS(this, V);
}

Powered by Google App Engine
This is Rietveld 408576698