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

Unified Diff: src/v8natives.js

Issue 856303002: Don't take iterable path in ArrayFrom if items[@@iterator] is null (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup test Created 5 years, 11 months 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
« no previous file with comments | « src/harmony-array.js ('k') | test/mjsunit/harmony/array-from.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index ac96f6391edb1b5377bc169da210e5053f827c93..23143345f666410c63a1d09c661cd2ecccb3d09d 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -654,6 +654,15 @@ function Delete(obj, p, should_throw) {
}
+// ES6, draft 12-24-14, section 7.3.8
+function GetMethod(obj, p) {
+ var func = obj[p];
+ if (IS_NULL_OR_UNDEFINED(func)) return UNDEFINED;
+ if (IS_SPEC_FUNCTION(func)) return func;
+ throw MakeTypeError('called_non_callable', [typeof func]);
+}
+
+
// Harmony proxies.
function DefineProxyProperty(obj, p, attributes, should_throw) {
// TODO(rossberg): adjust once there is a story for symbols vs proxies.
« no previous file with comments | « src/harmony-array.js ('k') | test/mjsunit/harmony/array-from.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698