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

Unified Diff: src/js/v8natives.js

Issue 2421803002: [builtins] Migrate Object.setPrototypeOf to C++. (Closed)
Patch Set: Created 4 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/builtins/builtins-object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index 0a05881bdfc43110881531a6cc0165d8017b7ab7..3ba39cf4b76051cfab6f28fda7d7eba706b690a7 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -104,21 +104,6 @@ function GetMethod(obj, p) {
throw %make_type_error(kCalledNonCallable, typeof func);
}
-// ES6 section 19.1.2.18.
-function ObjectSetPrototypeOf(obj, proto) {
- CHECK_OBJECT_COERCIBLE(obj, "Object.setPrototypeOf");
-
- if (proto !== null && !IS_RECEIVER(proto)) {
- throw %make_type_error(kProtoObjectOrNull, proto);
- }
-
- if (IS_RECEIVER(obj)) {
- %SetPrototype(obj, proto);
- }
-
- return obj;
-}
-
// ES6 B.2.2.1.1
function ObjectGetProto() {
return %object_get_prototype_of(this);
@@ -169,14 +154,6 @@ utils.InstallFunctions(GlobalObject.prototype, DONT_ENUM, [
utils.InstallGetterSetter(
GlobalObject.prototype, "__proto__", ObjectGetProto, ObjectSetProto);
-// Set up non-enumerable functions in the Object object.
-utils.InstallFunctions(GlobalObject, DONT_ENUM, [
- "setPrototypeOf", ObjectSetPrototypeOf,
- // getOwnPropertySymbols is added in symbol.js.
- // Others are added in bootstrapper.cc.
-]);
-
-
// ----------------------------------------------------------------------------
// Number
« no previous file with comments | « src/builtins/builtins-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698