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

Unified Diff: src/js/v8natives.js

Issue 2770753003: Migrate Object constructor to C++
Patch Set: Ack comments Created 3 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 | « src/debug/debug-evaluate.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 60a78d0ca986d52be9628a1b6a54880d3ddc7017..c66f0727880f50d1b082fea68bdcc60259a6ad5f 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -46,25 +46,10 @@ function GetMethod(obj, p) {
throw %make_type_error(kCalledNonCallable, typeof func);
}
-// ES6 19.1.1.1
-function ObjectConstructor(x) {
- if (GlobalObject != new.target && !IS_UNDEFINED(new.target)) {
- return this;
- }
- if (IS_NULL(x) || IS_UNDEFINED(x)) return {};
- return TO_OBJECT(x);
-}
-
// ----------------------------------------------------------------------------
// Object
-%SetNativeFlag(GlobalObject);
-%SetCode(GlobalObject, ObjectConstructor);
-
-%AddNamedProperty(GlobalObject.prototype, "constructor", GlobalObject,
- DONT_ENUM);
-
// Set up non-enumerable functions on the Object.prototype object.
utils.InstallFunctions(GlobalObject.prototype, DONT_ENUM, [
"toString", ObjectToString,
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698