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. |