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

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: added delete[] 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
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 77d22006a6aed9dfdca1a581644a87f85d2ce7da..d2ecdf3f08bc026293a75a8084e6fd0d7e3d9c46 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1044,6 +1044,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(

Powered by Google App Engine
This is Rietveld 408576698