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

Unified Diff: src/v8natives.js

Issue 998163004: [es6] Object.getOwnPropertyDescriptor should wrap primitives (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase 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-own-property-descriptor-non-objects.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 2c3bf9767c8962d5d747cb696a3eb67f41abfd47..42ee7709d6cdf6fb8bc48763bb936041da1f0457 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1000,13 +1000,9 @@ function ObjectSetPrototypeOf(obj, proto) {
}
-// ES5 section 15.2.3.3
+// ES6 section 19.1.2.6
function ObjectGetOwnPropertyDescriptor(obj, p) {
- if (!IS_SPEC_OBJECT(obj)) {
- throw MakeTypeError("called_on_non_object",
- ["Object.getOwnPropertyDescriptor"]);
- }
- var desc = GetOwnPropertyJS(obj, p);
+ var desc = GetOwnPropertyJS(TO_OBJECT_INLINE(obj), p);
return FromPropertyDescriptor(desc);
}
« no previous file with comments | « no previous file | test/mjsunit/get-own-property-descriptor-non-objects.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698