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

Unified Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 1091543002: IDL: Add [FlexibleArrayBufferView] and use for bufferSubData Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-includes-for-type-tuning
Patch Set: add warning about the storage's life-time Created 5 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 | « Source/bindings/tests/idls/core/TestObject.idl ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index 39ec0fc47fd5db87b358cdc296233966ffacb06f..90d6d8ffdcc6fe000c4c801fab93eee7268da458 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -55,6 +55,7 @@
#include "core/dom/ClassCollection.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
+#include "core/dom/FlexibleArrayBufferView.h"
#include "core/dom/TagCollection.h"
#include "core/dom/custom/CustomElementProcessingStack.h"
#include "core/frame/LocalFrame.h"
@@ -6693,6 +6694,27 @@ static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac
TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
+static void voidMethodFlexibleArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ if (UNLIKELY(info.Length() < 1)) {
+ V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodFlexibleArrayBufferViewArg", "TestObject", 1, info.Length()), info.GetIsolate());
+ return;
+ }
+ TestObject* impl = V8TestObject::toImpl(info.Holder());
+ FlexibleArrayBufferView arrayBufferViewArg;
+ {
+ toFlexibleArrayBufferView(info.GetIsolate(), info[0], arrayBufferViewArg, SMALL_ARRAY_BUFFER_VIEW_STORAGE(info[0]));
+ }
+ impl->voidMethodFlexibleArrayBufferViewArg(arrayBufferViewArg);
+}
+
+static void voidMethodFlexibleArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
+ TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethod(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
+}
+
static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 1)) {
@@ -12403,6 +12425,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
{"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBufferViewArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
+ {"voidMethodFlexibleArrayBufferViewArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
{"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
« no previous file with comments | « Source/bindings/tests/idls/core/TestObject.idl ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698