Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index ac96f6391edb1b5377bc169da210e5053f827c93..8ffddd5adb4d17a8f97d4a7958b83ddc2bdde86a 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -654,6 +654,16 @@ function Delete(obj, p, should_throw) { |
} |
+// ES6, draft 12-24-14, section 7.3.8 |
+function GetMethod(obj, p) { |
+ // Assert: obj is not null or undefined |
arv (Not doing code reviews)
2015/01/21 15:05:18
Remove?
caitp (gmail)
2015/01/21 17:21:49
Acknowledged.
|
+ var func = obj[p]; |
+ if (IS_NULL_OR_UNDEFINED(func)) return; |
arv (Not doing code reviews)
2015/01/21 15:05:18
return UNDEFINED;
for clarity?
caitp (gmail)
2015/01/21 17:21:49
Acknowledged.
|
+ if (IS_SPEC_FUNCTION(func)) return func; |
+ throw MakeTypeError('called_non_callable', [typeof func]); |
arv (Not doing code reviews)
2015/01/21 15:05:18
maybe update this to use the new better error mess
caitp (gmail)
2015/01/21 17:21:49
I had a go at it, but it will end up implicating A
|
+} |
+ |
+ |
// Harmony proxies. |
function DefineProxyProperty(obj, p, attributes, should_throw) { |
// TODO(rossberg): adjust once there is a story for symbols vs proxies. |