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

Side by Side Diff: src/js/arraybuffer.js

Issue 2096933002: Remove all harmony runtime flags which shipped in M51 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/js/array.js ('k') | src/js/collection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var GlobalArrayBuffer = global.ArrayBuffer; 14 var GlobalArrayBuffer = global.ArrayBuffer;
15 var MakeTypeError; 15 var MakeTypeError;
16 var MaxSimple; 16 var MaxSimple;
17 var MinSimple; 17 var MinSimple;
18 var SpeciesConstructor; 18 var SpeciesConstructor;
19 var speciesSymbol = utils.ImportNow("species_symbol");
19 20
20 utils.Import(function(from) { 21 utils.Import(function(from) {
21 MakeTypeError = from.MakeTypeError; 22 MakeTypeError = from.MakeTypeError;
22 MaxSimple = from.MaxSimple; 23 MaxSimple = from.MaxSimple;
23 MinSimple = from.MinSimple; 24 MinSimple = from.MinSimple;
24 SpeciesConstructor = from.SpeciesConstructor; 25 SpeciesConstructor = from.SpeciesConstructor;
25 }); 26 });
26 27
27 // ------------------------------------------------------------------- 28 // -------------------------------------------------------------------
28 29
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 throw MakeTypeError(kArrayBufferSpeciesThis); 78 throw MakeTypeError(kArrayBufferSpeciesThis);
78 } 79 }
79 if (%_ArrayBufferGetByteLength(result) < newLen) { 80 if (%_ArrayBufferGetByteLength(result) < newLen) {
80 throw MakeTypeError(kArrayBufferTooShort); 81 throw MakeTypeError(kArrayBufferTooShort);
81 } 82 }
82 83
83 %ArrayBufferSliceImpl(this, result, first, newLen); 84 %ArrayBufferSliceImpl(this, result, first, newLen);
84 return result; 85 return result;
85 } 86 }
86 87
88
89 function ArrayBufferSpecies() {
90 return this;
91 }
92
93 utils.InstallGetter(GlobalArrayBuffer, speciesSymbol, ArrayBufferSpecies);
94
87 utils.InstallGetter(GlobalArrayBuffer.prototype, "byteLength", 95 utils.InstallGetter(GlobalArrayBuffer.prototype, "byteLength",
88 ArrayBufferGetByteLen); 96 ArrayBufferGetByteLen);
89 97
90 utils.InstallFunctions(GlobalArrayBuffer.prototype, DONT_ENUM, [ 98 utils.InstallFunctions(GlobalArrayBuffer.prototype, DONT_ENUM, [
91 "slice", ArrayBufferSlice 99 "slice", ArrayBufferSlice
92 ]); 100 ]);
93 101
94 }) 102 })
OLDNEW
« no previous file with comments | « src/js/array.js ('k') | src/js/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698