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

Unified Diff: src/v8natives.js

Issue 1288623003: [runtime] Remove useless %_IsUndetectableObject intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/runtime/runtime-object.cc ('k') | no next file » | 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 29481d103eff888891e5d30ff20e8a0511c9e114..b950d4a274ba4b25d097cade19c9d847799212a0 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -139,7 +139,7 @@ utils.InstallFunctions(global, DONT_ENUM, [
// ECMA-262 - 15.2.4.2
function ObjectToString() {
- if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) return "[object Undefined]";
+ if (IS_UNDEFINED(this)) return "[object Undefined]";
if (IS_NULL(this)) return "[object Null]";
var O = TO_OBJECT(this);
var builtinTag = %_ClassOf(O);
@@ -213,7 +213,7 @@ function ObjectPropertyIsEnumerable(V) {
// Extensions for providing property getters and setters.
function ObjectDefineGetter(name, fun) {
var receiver = this;
- if (receiver == null && !IS_UNDETECTABLE(receiver)) {
+ if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
receiver = %GlobalProxy(ObjectDefineGetter);
}
if (!IS_SPEC_FUNCTION(fun)) {
@@ -229,7 +229,7 @@ function ObjectDefineGetter(name, fun) {
function ObjectLookupGetter(name) {
var receiver = this;
- if (receiver == null && !IS_UNDETECTABLE(receiver)) {
+ if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
receiver = %GlobalProxy(ObjectLookupGetter);
}
return %LookupAccessor(TO_OBJECT(receiver), $toName(name), GETTER);
@@ -238,7 +238,7 @@ function ObjectLookupGetter(name) {
function ObjectDefineSetter(name, fun) {
var receiver = this;
- if (receiver == null && !IS_UNDETECTABLE(receiver)) {
+ if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
receiver = %GlobalProxy(ObjectDefineSetter);
}
if (!IS_SPEC_FUNCTION(fun)) {
@@ -254,7 +254,7 @@ function ObjectDefineSetter(name, fun) {
function ObjectLookupSetter(name) {
var receiver = this;
- if (receiver == null && !IS_UNDETECTABLE(receiver)) {
+ if (IS_NULL(receiver) || IS_UNDEFINED(receiver)) {
receiver = %GlobalProxy(ObjectLookupSetter);
}
return %LookupAccessor(TO_OBJECT(receiver), $toName(name), SETTER);
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698