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

Unified Diff: src/js/v8natives.js

Issue 1932163002: Reland of move more dead code after Object.observe removal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: don't throw on error Created 4 years, 8 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/js/prologue.js ('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 be7271b1f061dcf61b7b04e815cebc327edd7b58..44be9419766b49424e1c522af9cb82c7032c4ff7 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -142,52 +142,6 @@ function ObjectPropertyIsEnumerable(V) {
return %PropertyIsEnumerable(TO_OBJECT(this), P);
}
-
-// Extensions for providing property getters and setters.
-function ObjectDefineGetter(name, fun) {
- var receiver = this;
- if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
- receiver = %GlobalProxy(ObjectDefineGetter);
- }
- if (!IS_CALLABLE(fun)) {
- throw MakeTypeError(kObjectGetterExpectingFunction);
- }
- var desc = {get: fun, enumerable: true, configurable: true};
- %reflect_define_property(receiver, name, desc);
-}
-
-
-function ObjectLookupGetter(name) {
- var receiver = this;
- if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
- receiver = %GlobalProxy(ObjectLookupGetter);
- }
- return %LookupAccessor(TO_OBJECT(receiver), TO_NAME(name), GETTER);
-}
-
-
-function ObjectDefineSetter(name, fun) {
- var receiver = this;
- if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
- receiver = %GlobalProxy(ObjectDefineSetter);
- }
- if (!IS_CALLABLE(fun)) {
- throw MakeTypeError(kObjectSetterExpectingFunction);
- }
- var desc = {set: fun, enumerable: true, configurable: true};
- %reflect_define_property(receiver, name, desc);
-}
-
-
-function ObjectLookupSetter(name) {
- var receiver = this;
- if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
- receiver = %GlobalProxy(ObjectLookupSetter);
- }
- return %LookupAccessor(TO_OBJECT(receiver), TO_NAME(name), SETTER);
-}
-
-
// ES6 7.3.9
function GetMethod(obj, p) {
var func = obj[p];
@@ -196,7 +150,6 @@ function GetMethod(obj, p) {
throw MakeTypeError(kCalledNonCallable, typeof func);
}
-
// ES6 section 19.1.2.18.
function ObjectSetPrototypeOf(obj, proto) {
CHECK_OBJECT_COERCIBLE(obj, "Object.setPrototypeOf");
@@ -212,7 +165,6 @@ function ObjectSetPrototypeOf(obj, proto) {
return obj;
}
-
// ES6 B.2.2.1.1
function ObjectGetProto() {
return %object_get_prototype_of(this);
@@ -255,10 +207,10 @@ utils.InstallFunctions(GlobalObject.prototype, DONT_ENUM, [
"valueOf", ObjectValueOf,
"isPrototypeOf", ObjectIsPrototypeOf,
"propertyIsEnumerable", ObjectPropertyIsEnumerable,
- "__defineGetter__", ObjectDefineGetter,
- "__lookupGetter__", ObjectLookupGetter,
- "__defineSetter__", ObjectDefineSetter,
- "__lookupSetter__", ObjectLookupSetter
+ // __defineGetter__ is added in bootstrapper.cc.
+ // __lookupGetter__ is added in bootstrapper.cc.
+ // __defineSetter__ is added in bootstrapper.cc.
+ // __lookupSetter__ is added in bootstrapper.cc.
]);
utils.InstallGetterSetter(
GlobalObject.prototype, "__proto__", ObjectGetProto, ObjectSetProto);
« no previous file with comments | « src/js/prologue.js ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698