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

Side by Side Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 1079983002: Introduce SmallTypedArray IDL type and use it for bufferSubData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 6644 matching lines...) Expand 10 before | Expand all | Expand 10 after
6655 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); 6655 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg);
6656 } 6656 }
6657 6657
6658 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 6658 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6659 { 6659 {
6660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6660 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6661 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); 6661 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info);
6662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6662 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6663 } 6663 }
6664 6664
6665 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6665 static void voidMethodArrayBufferViewArg1Method(const v8::FunctionCallbackInfo<v 8::Value>& info)
6666 { 6666 {
6667 if (UNLIKELY(info.Length() < 1)) { 6667 TestObject* impl = V8TestObject::toImpl(info.Holder());
6668 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodArrayBufferViewArg", "TestObject", 1, info.Length()) , info.GetIsolate()); 6668 std::pair<void*, size_t> arrayBufferViewArg;
6669 return; 6669 {
6670 arrayBufferViewArg = info[0]->IsArrayBufferView() ? arrayBufferViewArg = std::make_pair(alloca(v8::ArrayBufferView::Cast(*info[0])->ByteLength()), v8::A rrayBufferView::Cast(*info[0])->ByteLength()), v8::ArrayBufferView::Cast(*info[0 ])->CopyContents(arrayBufferViewArg.first, arrayBufferViewArg.second), arrayBuff erViewArg : std::make_pair(nullptr, 0);
6671 if (!arrayBufferViewArg.first) {
6672 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodArrayBufferViewArg", "TestObject", "parameter 1 is not of type 'ArrayBufferView' and 'small'."));
6673 return;
6674 }
6670 } 6675 }
6676 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg.first, arrayBufferView Arg.second);
6677 }
6678
6679 static void voidMethodArrayBufferViewArg2Method(const v8::FunctionCallbackInfo<v 8::Value>& info)
6680 {
6671 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6681 TestObject* impl = V8TestObject::toImpl(info.Holder());
6672 TestArrayBufferView* arrayBufferViewArg; 6682 TestArrayBufferView* arrayBufferViewArg;
6673 { 6683 {
6674 arrayBufferViewArg = info[0]->IsArrayBufferView() ? V8ArrayBufferView::t oImpl(v8::Local<v8::ArrayBufferView>::Cast(info[0])) : 0; 6684 arrayBufferViewArg = info[0]->IsArrayBufferView() ? V8ArrayBufferView::t oImpl(v8::Local<v8::ArrayBufferView>::Cast(info[0])) : 0;
6675 } 6685 }
6676 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); 6686 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg);
6677 } 6687 }
6678 6688
6689 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6690 {
6691 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayBufferViewArg", "TestObject", info.Holder(), info.GetIsolate());
6692 switch (std::min(1, info.Length())) {
6693 case 1:
6694 if (V8ArrayBufferView::hasInstance(info[0], info.GetIsolate()) && !v8::A rrayBufferView::Cast(*info[0])->HasBuffer()) {
6695 voidMethodArrayBufferViewArg1Method(info);
6696 return;
6697 }
6698 if (V8ArrayBufferView::hasInstance(info[0], info.GetIsolate())) {
6699 voidMethodArrayBufferViewArg2Method(info);
6700 return;
6701 }
6702 break;
6703 default:
6704 break;
6705 }
6706 if (info.Length() < 1) {
6707 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6708 exceptionState.throwIfNeeded();
6709 return;
6710 }
6711 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6712 exceptionState.throwIfNeeded();
6713 return;
6714 }
6715
6679 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 6716 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
6680 { 6717 {
6681 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6718 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6682 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); 6719 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info);
6683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6720 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6684 } 6721 }
6685 6722
6686 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 6723 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
6687 { 6724 {
6688 if (UNLIKELY(info.Length() < 1)) { 6725 if (UNLIKELY(info.Length() < 1)) {
(...skipping 6564 matching lines...) Expand 10 before | Expand all | Expand 10 after
13253 return false; 13290 return false;
13254 13291
13255 ScriptState::Scope scope(scriptState); 13292 ScriptState::Scope scope(scriptState);
13256 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 13293 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
13257 13294
13258 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 13295 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
13259 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 13296 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
13260 } 13297 }
13261 13298
13262 } // namespace blink 13299 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698