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

Unified Diff: src/factory.cc

Issue 13958007: First cut at API for ES6 ArrayBuffers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 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/factory.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index e668e27973c83b859c1e42b80641a1c9f20dd5a7..f36006c1140db9bae82216352f4df5215d35735a 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1046,6 +1046,16 @@ void Factory::EnsureCanContainElements(Handle<JSArray> array,
}
+Handle<JSArrayBuffer> Factory::NewJSArrayBuffer() {
+ JSFunction* array_buffer_fun =
+ isolate()->context()->native_context()->array_buffer_fun();
+ CALL_HEAP_FUNCTION(
+ isolate(),
+ isolate()->heap()->AllocateJSObject(array_buffer_fun),
+ JSArrayBuffer);
+}
+
+
Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler,
Handle<Object> prototype) {
CALL_HEAP_FUNCTION(
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698