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

Unified Diff: src/js/array.js

Issue 1922453002: Migrate Object.getPrototypeOf from v8natives to builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/contexts.h ('k') | src/js/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/array.js
diff --git a/src/js/array.js b/src/js/array.js
index 4816dfbdf1c4729f5507f499bb77e21eebe1a2cc..51f557a58ad10c615a5e873e11a88fc699454d8d 100644
--- a/src/js/array.js
+++ b/src/js/array.js
@@ -898,7 +898,8 @@ function InnerArraySort(array, length, comparefn) {
// of a prototype property.
var CopyFromPrototype = function CopyFromPrototype(obj, length) {
var max = 0;
- for (var proto = %_GetPrototype(obj); proto; proto = %_GetPrototype(proto)) {
+ for (var proto = %object_get_prototype_of(obj); proto;
+ proto = %object_get_prototype_of(proto)) {
var indices = IS_PROXY(proto) ? length : %GetArrayKeys(proto, length);
if (IS_NUMBER(indices)) {
// It's an interval.
@@ -926,7 +927,8 @@ function InnerArraySort(array, length, comparefn) {
// where a prototype of obj has an element. I.e., shadow all prototype
// elements in that range.
var ShadowPrototypeElements = function(obj, from, to) {
- for (var proto = %_GetPrototype(obj); proto; proto = %_GetPrototype(proto)) {
+ for (var proto = %object_get_prototype_of(obj); proto;
+ proto = %object_get_prototype_of(proto)) {
var indices = IS_PROXY(proto) ? to : %GetArrayKeys(proto, to);
if (IS_NUMBER(indices)) {
// It's an interval.
@@ -993,7 +995,7 @@ function InnerArraySort(array, length, comparefn) {
}
for (i = length - num_holes; i < length; i++) {
// For compatability with Webkit, do not expose elements in the prototype.
- if (i in %_GetPrototype(obj)) {
+ if (i in %object_get_prototype_of(obj)) {
obj[i] = UNDEFINED;
} else {
delete obj[i];
« no previous file with comments | « src/contexts.h ('k') | src/js/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698