| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2010 Google Inc. All rights reserved. | 2  * Copyright (C) 2010 Google Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions | 5  * modification, are permitted provided that the following conditions | 
| 6  * are met: | 6  * are met: | 
| 7  * | 7  * | 
| 8  * 1.  Redistributions of source code must retain the above copyright | 8  * 1.  Redistributions of source code must retain the above copyright | 
| 9  *     notice, this list of conditions and the following disclaimer. | 9  *     notice, this list of conditions and the following disclaimer. | 
| 10  * 2.  Redistributions in binary form must reproduce the above copyright | 10  * 2.  Redistributions in binary form must reproduce the above copyright | 
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 736 | 736 | 
| 737     return true; | 737     return true; | 
| 738 } | 738 } | 
| 739 | 739 | 
| 740 void Dictionary::ConversionContext::resetPerPropertyContext() | 740 void Dictionary::ConversionContext::resetPerPropertyContext() | 
| 741 { | 741 { | 
| 742     if (m_dirty) { | 742     if (m_dirty) { | 
| 743         m_dirty = false; | 743         m_dirty = false; | 
| 744         m_isNullable = false; | 744         m_isNullable = false; | 
| 745         m_propertyTypeName = ""; | 745         m_propertyTypeName = ""; | 
| 746         m_numberConversion = NormalConversion; |  | 
| 747     } | 746     } | 
| 748 } | 747 } | 
| 749 | 748 | 
| 750 Dictionary::ConversionContext& Dictionary::ConversionContext::withAttributes(boo
     l isNullable, IntegerConversionConfiguration conversion, const String& typeName) | 749 Dictionary::ConversionContext& Dictionary::ConversionContext::setConversionType(
     const String& typeName, bool isNullable) | 
| 751 { | 750 { | 
| 752     ASSERT(!m_dirty); | 751     ASSERT(!m_dirty); | 
| 753     m_dirty = true; | 752     m_dirty = true; | 
| 754     m_isNullable = isNullable; | 753     m_isNullable = isNullable; | 
| 755     m_propertyTypeName = typeName; | 754     m_propertyTypeName = typeName; | 
| 756     m_numberConversion = conversion; |  | 
| 757 | 755 | 
| 758     return *this; | 756     return *this; | 
| 759 } | 757 } | 
| 760 | 758 | 
| 761 Dictionary::ConversionContext& Dictionary::ConversionContext::withAttributes(boo
     l isNullable, const String& typeName) |  | 
| 762 { |  | 
| 763     return withAttributes(isNullable, NormalConversion, typeName); |  | 
| 764 } |  | 
| 765 |  | 
| 766 Dictionary::ConversionContext& Dictionary::ConversionContext::withAttributes(boo
     l isNullable, IntegerConversionConfiguration conversion) |  | 
| 767 { |  | 
| 768     return withAttributes(isNullable, conversion, ""); |  | 
| 769 } |  | 
| 770 |  | 
| 771 Dictionary::ConversionContext& Dictionary::ConversionContext::withAttributes(con
     st String& typeName) |  | 
| 772 { |  | 
| 773     return withAttributes(false, NormalConversion, typeName); |  | 
| 774 } |  | 
| 775 |  | 
| 776 Dictionary::ConversionContext& Dictionary::ConversionContext::withAttributes(boo
     l isNullable) |  | 
| 777 { |  | 
| 778     return withAttributes(isNullable, NormalConversion, ""); |  | 
| 779 } |  | 
| 780 |  | 
| 781 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 759 void Dictionary::ConversionContext::throwTypeError(const String& detail) | 
| 782 { | 760 { | 
| 783     if (forConstructor()) { | 761     if (forConstructor()) { | 
| 784         exceptionState().throwTypeError(detail); | 762         exceptionState().throwTypeError(detail); | 
| 785     } else { | 763     } else { | 
| 786         ASSERT(!methodName().isEmpty()); | 764         ASSERT(!methodName().isEmpty()); | 
| 787         exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter
     faceName(), methodName(), detail)); | 765         exceptionState().throwTypeError(ExceptionMessages::failedToExecute(inter
     faceName(), methodName(), detail)); | 
| 788     } | 766     } | 
| 789 } | 767 } | 
| 790 | 768 | 
| 791 } // namespace WebCore | 769 } // namespace WebCore | 
| OLD | NEW | 
|---|