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

Unified Diff: src/v8natives.js

Issue 1051523003: [es6] Object.getPrototypeOf should work with values (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | test/mjsunit/get-prototype-of.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 cbd8e14679687455ad3dfe9e3f0459d50a8dc527..7a7915aa592b4a1e831b696c38b24e29197cc52f 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -979,12 +979,9 @@ function DefineOwnProperty(obj, p, desc, should_throw) {
}
-// ES5 section 15.2.3.2.
+// ES6 section 19.1.2.9
function ObjectGetPrototypeOf(obj) {
- if (!IS_SPEC_OBJECT(obj)) {
- throw MakeTypeError("called_on_non_object", ["Object.getPrototypeOf"]);
- }
- return %_GetPrototype(obj);
+ return %_GetPrototype(TO_OBJECT_INLINE(obj));
}
// ES6 section 19.1.2.19.
« no previous file with comments | « no previous file | test/mjsunit/get-prototype-of.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698