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

Unified Diff: src/js/v8natives.js

Issue 1558433002: [runtime] Migrate Object.create to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Camillos comment. Created 5 years 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/heap/heap.h ('k') | src/objects.h » ('j') | 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 8a748a5ebf2ae24c2acdf685fac0dc73a0efd486..c4c2b6fdc12cdddbf62673683d4f789d3d4725db 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -793,18 +793,6 @@ function ObjectGetOwnPropertyNames(obj) {
}
-// ES5 section 15.2.3.5.
-function ObjectCreate(proto, properties) {
- if (!IS_RECEIVER(proto) && proto !== null) {
- throw MakeTypeError(kProtoObjectOrNull, proto);
- }
- var obj = {};
- %InternalSetPrototype(obj, proto);
- if (!IS_UNDEFINED(properties)) ObjectDefineProperties(obj, properties);
- return obj;
-}
-
-
// ES5 section 15.2.3.6.
function ObjectDefineProperty(obj, p, attributes) {
// The new pure-C++ implementation doesn't support O.o.
@@ -947,7 +935,6 @@ utils.InstallGetterSetter(GlobalObject.prototype, "__proto__", ObjectGetProto,
utils.InstallFunctions(GlobalObject, DONT_ENUM, [
// assign is added in bootstrapper.cc.
"keys", ObjectKeys,
- "create", ObjectCreate,
"defineProperty", ObjectDefineProperty,
"defineProperties", ObjectDefineProperties,
"freeze", ObjectFreezeJS,
« no previous file with comments | « src/heap/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698