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

Side by Side Diff: src/arraybuffer.js

Issue 1136553006: Implement SharedArrayBuffer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master Created 5 years, 7 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/api.cc ('k') | src/bootstrapper.cc » ('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
(...skipping 10 matching lines...) Expand all
21 utils.Import(function(from) { 21 utils.Import(function(from) {
22 MathMax = from.MathMax; 22 MathMax = from.MathMax;
23 MathMin = from.MathMin; 23 MathMin = from.MathMin;
24 }); 24 });
25 25
26 // ------------------------------------------------------------------- 26 // -------------------------------------------------------------------
27 27
28 function ArrayBufferConstructor(length) { // length = 1 28 function ArrayBufferConstructor(length) { // length = 1
29 if (%_IsConstructCall()) { 29 if (%_IsConstructCall()) {
30 var byteLength = $toPositiveInteger(length, kInvalidArrayBufferLength); 30 var byteLength = $toPositiveInteger(length, kInvalidArrayBufferLength);
31 %ArrayBufferInitialize(this, byteLength); 31 %ArrayBufferInitialize(this, byteLength, kNotShared);
32 } else { 32 } else {
33 throw MakeTypeError(kConstructorNotFunction, "ArrayBuffer"); 33 throw MakeTypeError(kConstructorNotFunction, "ArrayBuffer");
34 } 34 }
35 } 35 }
36 36
37 function ArrayBufferGetByteLen() { 37 function ArrayBufferGetByteLen() {
38 if (!IS_ARRAYBUFFER(this)) { 38 if (!IS_ARRAYBUFFER(this)) {
39 throw MakeTypeError(kIncompatibleMethodReceiver, 39 throw MakeTypeError(kIncompatibleMethodReceiver,
40 'ArrayBuffer.prototype.byteLength', this); 40 'ArrayBuffer.prototype.byteLength', this);
41 } 41 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 $installFunctions(GlobalArrayBuffer, DONT_ENUM, [ 100 $installFunctions(GlobalArrayBuffer, DONT_ENUM, [
101 "isView", ArrayBufferIsViewJS 101 "isView", ArrayBufferIsViewJS
102 ]); 102 ]);
103 103
104 $installFunctions(GlobalArrayBuffer.prototype, DONT_ENUM, [ 104 $installFunctions(GlobalArrayBuffer.prototype, DONT_ENUM, [
105 "slice", ArrayBufferSlice 105 "slice", ArrayBufferSlice
106 ]); 106 ]);
107 107
108 }) 108 })
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698