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

Unified Diff: src/v8natives.js

Issue 613283002: Convert argument toObject() in Object.getOwnPropertyNames/Descriptors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: FAIL_OK rather than SKIP Created 6 years, 2 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/symbol.js ('k') | test/mjsunit/es6/symbols.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 9bb4b8367e5213a901eb19d34fff40deb7478a2a..ad7f18aaf1920a496d6634c9771141e4995ad148 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1107,9 +1107,7 @@ function ObjectGetOwnPropertyKeys(obj, symbolsOnly) {
// ES5 section 15.2.3.4.
function ObjectGetOwnPropertyNames(obj) {
- if (!IS_SPEC_OBJECT(obj)) {
- throw MakeTypeError("called_on_non_object", ["Object.getOwnPropertyNames"]);
- }
+ obj = ToObject(obj);
// Special handling for proxies.
if (%IsJSProxy(obj)) {
var handler = %GetHandler(obj);
« no previous file with comments | « src/symbol.js ('k') | test/mjsunit/es6/symbols.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698