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

Unified Diff: src/bootstrapper.cc

Issue 2126603003: [builtins] Migrate ArrayBufferPrototypeByteLength to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment with ES6 section Created 4 years, 5 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 | « no previous file | src/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 4baca14ec8d2ae638c287ee03846f17c664f2fad..c16285af45a4317dc3dba154af9aefdac3f5e91d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2887,6 +2887,7 @@ void Genesis::InitializeGlobal_harmony_array_prototype_values() {
Handle<JSFunction> Genesis::InstallArrayBuffer(Handle<JSObject> target,
const char* name) {
+ // Create the %ArrayBufferPrototype%
// Setup the {prototype} with the given {name} for @@toStringTag.
Handle<JSObject> prototype =
factory()->NewJSObject(isolate()->object_function(), TENURED);
@@ -2911,6 +2912,11 @@ Handle<JSFunction> Genesis::InstallArrayBuffer(Handle<JSObject> target,
SimpleInstallFunction(array_buffer_fun, factory()->isView_string(),
Builtins::kArrayBufferIsView, 1, true);
+ // Install the "byteLength" getter on the {prototype}.
+ SimpleInstallGetter(prototype, factory()->byte_length_string(),
+ Builtins::kArrayBufferPrototypeGetByteLength, false,
+ kArrayBufferByteLength);
+
return array_buffer_fun;
}
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698