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

Unified Diff: src/js/v8natives.js

Issue 1411653002: Install iterator meta objects via utils object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 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/js/string-iterator.js ('k') | test/cctest/test-heap.cc » ('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 2aeca951280a7c5a6257c3cb343a98a8e98e77ae..d2cbf9675a09114ba25cf9f22ac60184fd2001e7 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -25,6 +25,7 @@ var ObserveEnqueueSpliceRecord;
var ProxyDelegateCallAndConstruct;
var ProxyDerivedHasOwnTrap;
var ProxyDerivedKeysTrap;
+var SameValue = utils.ImportNow("SameValue");
var StringIndexOf;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
@@ -653,17 +654,17 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
if ((IsGenericDescriptor(desc) ||
IsDataDescriptor(desc) == IsDataDescriptor(current)) &&
(!desc.hasEnumerable() ||
- $sameValue(desc.isEnumerable(), current.isEnumerable())) &&
+ SameValue(desc.isEnumerable(), current.isEnumerable())) &&
(!desc.hasConfigurable() ||
- $sameValue(desc.isConfigurable(), current.isConfigurable())) &&
+ SameValue(desc.isConfigurable(), current.isConfigurable())) &&
(!desc.hasWritable() ||
- $sameValue(desc.isWritable(), current.isWritable())) &&
+ SameValue(desc.isWritable(), current.isWritable())) &&
(!desc.hasValue() ||
- $sameValue(desc.getValue(), current.getValue())) &&
+ SameValue(desc.getValue(), current.getValue())) &&
(!desc.hasGetter() ||
- $sameValue(desc.getGet(), current.getGet())) &&
+ SameValue(desc.getGet(), current.getGet())) &&
(!desc.hasSetter() ||
- $sameValue(desc.getSet(), current.getSet()))) {
+ SameValue(desc.getSet(), current.getSet()))) {
return true;
}
if (!current.isConfigurable()) {
@@ -702,7 +703,7 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
}
}
if (!currentIsWritable && desc.hasValue() &&
- !$sameValue(desc.getValue(), current.getValue())) {
+ !SameValue(desc.getValue(), current.getValue())) {
if (should_throw) {
throw MakeTypeError(kRedefineDisallowed, p);
} else {
@@ -713,14 +714,14 @@ function DefineObjectProperty(obj, p, desc, should_throw) {
// Step 11
if (IsAccessorDescriptor(desc) && IsAccessorDescriptor(current)) {
if (desc.hasSetter() &&
- !$sameValue(desc.getSet(), current.getSet())) {
+ !SameValue(desc.getSet(), current.getSet())) {
if (should_throw) {
throw MakeTypeError(kRedefineDisallowed, p);
} else {
return false;
}
}
- if (desc.hasGetter() && !$sameValue(desc.getGet(),current.getGet())) {
+ if (desc.hasGetter() && !SameValue(desc.getGet(),current.getGet())) {
if (should_throw) {
throw MakeTypeError(kRedefineDisallowed, p);
} else {
@@ -1259,12 +1260,6 @@ function ObjectIsExtensible(obj) {
}
-// ECMA-262, Edition 6, section 19.1.2.10
-function ObjectIs(obj1, obj2) {
- return $sameValue(obj1, obj2);
-}
-
-
// ECMA-262, Edition 6, section 19.1.2.1
function ObjectAssign(target, sources) {
// TODO(bmeurer): Move this to toplevel.
@@ -1360,7 +1355,7 @@ utils.InstallFunctions(GlobalObject, DONT_ENUM, [
"getOwnPropertyDescriptor", ObjectGetOwnPropertyDescriptor,
"getOwnPropertyNames", ObjectGetOwnPropertyNames,
// getOwnPropertySymbols is added in symbol.js.
- "is", ObjectIs,
+ "is", SameValue, // ECMA-262, Edition 6, section 19.1.2.10
"isExtensible", ObjectIsExtensible,
"isFrozen", ObjectIsFrozen,
"isSealed", ObjectIsSealed,
« no previous file with comments | « src/js/string-iterator.js ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698