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

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

Issue 911433003: IDL: Auto-declare remaining methods implied by maplike<>/setlike<> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-iterable-continued
Patch Set: Created 5 years, 10 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
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 10802 matching lines...) Expand 10 before | Expand all | Expand 10 after
10813 } 10813 }
10814 } 10814 }
10815 10815
10816 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 10816 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
10817 { 10817 {
10818 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10818 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10819 TestObjectV8Internal::forEachMethod(info); 10819 TestObjectV8Internal::forEachMethod(info);
10820 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 10820 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10821 } 10821 }
10822 10822
10823 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10824 {
10825 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test Object", info.Holder(), info.GetIsolate());
10826 if (UNLIKELY(info.Length() < 1)) {
10827 setMinimumArityTypeError(exceptionState, 1, info.Length());
10828 exceptionState.throwIfNeeded();
10829 return;
10830 }
10831 TestObject* impl = V8TestObject::toImpl(info.Holder());
10832 int key;
10833 {
10834 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(key, toInt32(info[0], exceptionSta te), exceptionState);
10835 }
10836 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
10837 bool result = impl->has(scriptState, key, exceptionState);
10838 if (exceptionState.hadException()) {
10839 exceptionState.throwIfNeeded();
10840 return;
10841 }
10842 v8SetReturnValueBool(info, result);
10843 }
10844
10845 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10846 {
10847 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10848 TestObjectV8Internal::hasMethod(info);
10849 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10850 }
10851
10852 static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10853 {
10854 ExceptionState exceptionState(ExceptionState::ExecutionContext, "get", "Test Object", info.Holder(), info.GetIsolate());
10855 if (UNLIKELY(info.Length() < 1)) {
10856 setMinimumArityTypeError(exceptionState, 1, info.Length());
10857 exceptionState.throwIfNeeded();
10858 return;
10859 }
10860 TestObject* impl = V8TestObject::toImpl(info.Holder());
10861 int key;
10862 {
10863 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(key, toInt32(info[0], exceptionSta te), exceptionState);
10864 }
10865 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
10866 ScriptValue result = impl->get(scriptState, key, exceptionState);
10867 if (exceptionState.hadException()) {
10868 exceptionState.throwIfNeeded();
10869 return;
10870 }
10871 v8SetReturnValue(info, result.v8Value());
10872 }
10873
10874 static void getMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10875 {
10876 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10877 TestObjectV8Internal::getMethod(info);
10878 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10879 }
10880
10881 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10882 {
10883 ExceptionState exceptionState(ExceptionState::ExecutionContext, "clear", "Te stObject", info.Holder(), info.GetIsolate());
10884 TestObject* impl = V8TestObject::toImpl(info.Holder());
10885 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
10886 impl->clear(scriptState, exceptionState);
10887 if (exceptionState.hadException()) {
10888 exceptionState.throwIfNeeded();
10889 return;
10890 }
10891 }
10892
10893 static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10894 {
10895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10896 TestObjectV8Internal::clearMethod(info);
10897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10898 }
10899
10900 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10901 {
10902 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T estObject", info.Holder(), info.GetIsolate());
10903 if (UNLIKELY(info.Length() < 1)) {
10904 setMinimumArityTypeError(exceptionState, 1, info.Length());
10905 exceptionState.throwIfNeeded();
10906 return;
10907 }
10908 TestObject* impl = V8TestObject::toImpl(info.Holder());
10909 int key;
10910 {
10911 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(key, toInt32(info[0], exceptionSta te), exceptionState);
10912 }
10913 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
10914 bool result = impl->delete(scriptState, key, exceptionState);
10915 if (exceptionState.hadException()) {
10916 exceptionState.throwIfNeeded();
10917 return;
10918 }
10919 v8SetReturnValueBool(info, result);
10920 }
10921
10922 static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
10923 {
10924 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10925 TestObjectV8Internal::deleteMethod(info);
10926 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10927 }
10928
10929 static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10930 {
10931 ExceptionState exceptionState(ExceptionState::ExecutionContext, "set", "Test Object", info.Holder(), info.GetIsolate());
10932 if (UNLIKELY(info.Length() < 2)) {
10933 setMinimumArityTypeError(exceptionState, 2, info.Length());
10934 exceptionState.throwIfNeeded();
10935 return;
10936 }
10937 TestObject* impl = V8TestObject::toImpl(info.Holder());
10938 int key;
10939 V8StringResource<> value;
10940 {
10941 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(key, toInt32(info[0], exceptionSta te), exceptionState);
10942 TOSTRING_VOID_INTERNAL(value, info[1]);
10943 }
10944 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
10945 RefPtr<TestObject> result = impl->set(scriptState, key, value, exceptionStat e);
10946 if (exceptionState.hadException()) {
10947 exceptionState.throwIfNeeded();
10948 return;
10949 }
10950 v8SetReturnValue(info, result.release());
10951 }
10952
10953 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10954 {
10955 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10956 TestObjectV8Internal::setMethod(info);
10957 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
10958 }
10959
10823 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 10960 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10824 { 10961 {
10825 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10962 TestObject* impl = V8TestObject::toImpl(info.Holder());
10826 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() ); 10963 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() );
10827 } 10964 }
10828 10965
10829 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 10966 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
10830 { 10967 {
10831 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 10968 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
10832 TestObjectV8Internal::toStringMethod(info); 10969 TestObjectV8Internal::toStringMethod(info);
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
11245 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS cripts}, 11382 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS cripts},
11246 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 11383 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
11247 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts}, 11384 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts},
11248 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D OMConfiguration::ExposedToAllScripts}, 11385 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D OMConfiguration::ExposedToAllScripts},
11249 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0 , 5, V8DOMConfiguration::ExposedToAllScripts}, 11386 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0 , 5, V8DOMConfiguration::ExposedToAllScripts},
11250 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl yExposedToPrivateScript}, 11387 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl yExposedToPrivateScript},
11251 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration: :ExposedToAllScripts}, 11388 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration: :ExposedToAllScripts},
11252 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat ion::ExposedToAllScripts}, 11389 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat ion::ExposedToAllScripts},
11253 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur ation::ExposedToAllScripts}, 11390 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur ation::ExposedToAllScripts},
11254 {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, V8DOMConfigur ation::ExposedToAllScripts}, 11391 {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, V8DOMConfigur ation::ExposedToAllScripts},
11392 {"has", TestObjectV8Internal::hasMethodCallback, 0, 1, V8DOMConfiguration::E xposedToAllScripts},
11393 {"get", TestObjectV8Internal::getMethodCallback, 0, 1, V8DOMConfiguration::E xposedToAllScripts},
11394 {"clear", TestObjectV8Internal::clearMethodCallback, 0, 0, V8DOMConfiguratio n::ExposedToAllScripts},
11395 {"delete", TestObjectV8Internal::deleteMethodCallback, 0, 1, V8DOMConfigurat ion::ExposedToAllScripts},
11396 {"set", TestObjectV8Internal::setMethodCallback, 0, 2, V8DOMConfiguration::E xposedToAllScripts},
11255 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig uration::ExposedToAllScripts}, 11397 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig uration::ExposedToAllScripts},
11256 }; 11398 };
11257 11399
11258 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function Template, v8::Isolate* isolate) 11400 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function Template, v8::Isolate* isolate)
11259 { 11401 {
11260 functionTemplate->ReadOnlyPrototype(); 11402 functionTemplate->ReadOnlyPrototype();
11261 11403
11262 v8::Local<v8::Signature> defaultSignature; 11404 v8::Local<v8::Signature> defaultSignature;
11263 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int ernalFieldCount, 11405 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int ernalFieldCount,
11264 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), 11406 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes),
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
11911 return false; 12053 return false;
11912 12054
11913 ScriptState::Scope scope(scriptState); 12055 ScriptState::Scope scope(scriptState);
11914 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12056 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11915 12057
11916 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 12058 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
11917 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 12059 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
11918 } 12060 }
11919 12061
11920 } // namespace blink 12062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698