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

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

Issue 1730323002: Make nullable DOMString always treat undefined as null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase test results Created 4 years, 9 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 "V8TestObject.h" 7 #include "V8TestObject.h"
8 8
9 #include "bindings/core/v8/BindingSecurity.h" 9 #include "bindings/core/v8/BindingSecurity.h"
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 1600
1601 static void stringOrNullAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 1601 static void stringOrNullAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
1602 { 1602 {
1603 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info); 1603 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info);
1604 } 1604 }
1605 1605
1606 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) 1606 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
1607 { 1607 {
1608 v8::Local<v8::Object> holder = info.Holder(); 1608 v8::Local<v8::Object> holder = info.Holder();
1609 TestObject* impl = V8TestObject::toImpl(holder); 1609 TestObject* impl = V8TestObject::toImpl(holder);
1610 V8StringResource<TreatNullAsNullString> cppValue = v8Value; 1610 V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
1611 if (!cppValue.prepare()) 1611 if (!cppValue.prepare())
1612 return; 1612 return;
1613 impl->setStringOrNullAttribute(cppValue); 1613 impl->setStringOrNullAttribute(cppValue);
1614 } 1614 }
1615 1615
1616 static void stringOrNullAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 1616 static void stringOrNullAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
1617 { 1617 {
1618 v8::Local<v8::Value> v8Value = info[0]; 1618 v8::Local<v8::Value> v8Value = info[0];
1619 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info); 1619 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info);
1620 } 1620 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 static void testEnumOrNullAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 1735 static void testEnumOrNullAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
1736 { 1736 {
1737 TestObjectV8Internal::testEnumOrNullAttributeAttributeGetter(info); 1737 TestObjectV8Internal::testEnumOrNullAttributeAttributeGetter(info);
1738 } 1738 }
1739 1739
1740 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 1740 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
1741 { 1741 {
1742 v8::Local<v8::Object> holder = info.Holder(); 1742 v8::Local<v8::Object> holder = info.Holder();
1743 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrNull Attribute", "TestObject", holder, info.GetIsolate()); 1743 ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrNull Attribute", "TestObject", holder, info.GetIsolate());
1744 TestObject* impl = V8TestObject::toImpl(holder); 1744 TestObject* impl = V8TestObject::toImpl(holder);
1745 V8StringResource<TreatNullAsNullString> cppValue = v8Value; 1745 V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
1746 if (!cppValue.prepare()) 1746 if (!cppValue.prepare())
1747 return; 1747 return;
1748 const char* validValues[] = { 1748 const char* validValues[] = {
1749 "", 1749 "",
1750 "EnumValue1", 1750 "EnumValue1",
1751 "EnumValue2", 1751 "EnumValue2",
1752 "EnumValue3", 1752 "EnumValue3",
1753 }; 1753 };
1754 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test Enum", exceptionState)) { 1754 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "Test Enum", exceptionState)) {
1755 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); 1755 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 2237
2238 static void cachedStringOrNoneAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 2238 static void cachedStringOrNoneAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
2239 { 2239 {
2240 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); 2240 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info);
2241 } 2241 }
2242 2242
2243 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 2243 static void cachedStringOrNoneAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
2244 { 2244 {
2245 v8::Local<v8::Object> holder = info.Holder(); 2245 v8::Local<v8::Object> holder = info.Holder();
2246 TestObject* impl = V8TestObject::toImpl(holder); 2246 TestObject* impl = V8TestObject::toImpl(holder);
2247 V8StringResource<TreatNullAsNullString> cppValue = v8Value; 2247 V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
2248 if (!cppValue.prepare()) 2248 if (!cppValue.prepare())
2249 return; 2249 return;
2250 impl->setCachedStringOrNoneAttribute(cppValue); 2250 impl->setCachedStringOrNoneAttribute(cppValue);
2251 V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), ho lder, v8AtomicString(info.GetIsolate(), "cachedStringOrNoneAttribute")); // Inva lidate the cached value. 2251 V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), ho lder, v8AtomicString(info.GetIsolate(), "cachedStringOrNoneAttribute")); // Inva lidate the cached value.
2252 } 2252 }
2253 2253
2254 static void cachedStringOrNoneAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 2254 static void cachedStringOrNoneAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
2255 { 2255 {
2256 v8::Local<v8::Value> v8Value = info[0]; 2256 v8::Local<v8::Value> v8Value = info[0];
2257 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in fo); 2257 TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, in fo);
(...skipping 5414 matching lines...) Expand 10 before | Expand all | Expand 10 after
7672 7672
7673 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 7673 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
7674 { 7674 {
7675 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); 7675 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info);
7676 } 7676 }
7677 7677
7678 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 7678 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
7679 { 7679 {
7680 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); 7680 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate());
7681 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7681 TestObject* impl = V8TestObject::toImpl(info.Holder());
7682 V8StringResource<TreatNullAsNullString> defaultStringArg; 7682 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg;
7683 { 7683 {
7684 if (!info[0]->IsUndefined()) { 7684 if (!info[0]->IsUndefined()) {
7685 defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptio nState); 7685 defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptio nState);
7686 if (exceptionState.throwIfNeeded()) 7686 if (exceptionState.throwIfNeeded())
7687 return; 7687 return;
7688 } else { 7688 } else {
7689 defaultStringArg = nullptr; 7689 defaultStringArg = nullptr;
7690 } 7690 }
7691 } 7691 }
7692 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); 7692 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg);
7693 } 7693 }
7694 7694
7695 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 7695 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
7696 { 7696 {
7697 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info); 7697 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info);
7698 } 7698 }
7699 7699
7700 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 7700 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
7701 { 7701 {
7702 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7702 TestObject* impl = V8TestObject::toImpl(info.Holder());
7703 V8StringResource<TreatNullAsNullString> defaultStringArg; 7703 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg;
7704 { 7704 {
7705 if (!info[0]->IsUndefined()) { 7705 if (!info[0]->IsUndefined()) {
7706 defaultStringArg = info[0]; 7706 defaultStringArg = info[0];
7707 if (!defaultStringArg.prepare()) 7707 if (!defaultStringArg.prepare())
7708 return; 7708 return;
7709 } else { 7709 } else {
7710 defaultStringArg = nullptr; 7710 defaultStringArg = nullptr;
7711 } 7711 }
7712 } 7712 }
7713 impl->voidMethodDefaultNullableStringArg(defaultStringArg); 7713 impl->voidMethodDefaultNullableStringArg(defaultStringArg);
(...skipping 4979 matching lines...) Expand 10 before | Expand all | Expand 10 after
12693 ScriptState::Scope scope(scriptState); 12693 ScriptState::Scope scope(scriptState);
12694 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12694 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
12695 if (holder.IsEmpty()) 12695 if (holder.IsEmpty())
12696 return false; 12696 return false;
12697 12697
12698 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 12698 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
12699 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 12699 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
12700 } 12700 }
12701 12701
12702 } // namespace blink 12702 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698