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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ExceptionMessages.h

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 result.Append(FormatNumber(lower_bound)); 135 result.Append(FormatNumber(lower_bound));
136 result.Append(", "); 136 result.Append(", ");
137 result.Append(FormatNumber(upper_bound)); 137 result.Append(FormatNumber(upper_bound));
138 result.Append(upper_type == kExclusiveBound ? ')' : ']'); 138 result.Append(upper_type == kExclusiveBound ? ')' : ']');
139 result.Append('.'); 139 result.Append('.');
140 return result.ToString(); 140 return result.ToString();
141 } 141 }
142 142
143 static String InvalidArity(const char* expected, unsigned provided); 143 static String InvalidArity(const char* expected, unsigned provided);
144 144
145 // If > 0, the argument index that failed type check (1-indexed.)
146 // If == 0, a (non-argument) value (e.g., a setter) failed the same check.
147 static String NotAnArrayTypeArgumentOrValue(int argument_index);
148 static String NotASequenceTypeProperty(const String& property_name); 145 static String NotASequenceTypeProperty(const String& property_name);
149 static String NotAFiniteNumber(double value, 146 static String NotAFiniteNumber(double value,
150 const char* name = "value provided"); 147 const char* name = "value provided");
151 static String NotAFiniteNumber(const Decimal& value, 148 static String NotAFiniteNumber(const Decimal& value,
152 const char* name = "value provided"); 149 const char* name = "value provided");
153 150
154 static String NotEnoughArguments(unsigned expected, unsigned provided); 151 static String NotEnoughArguments(unsigned expected, unsigned provided);
155 152
156 static String ReadOnly(const char* detail = 0); 153 static String ReadOnly(const char* detail = 0);
157 154
(...skipping 20 matching lines...) Expand all
178 }; 175 };
179 176
180 template <> 177 template <>
181 String ExceptionMessages::FormatNumber<float>(float number); 178 String ExceptionMessages::FormatNumber<float>(float number);
182 template <> 179 template <>
183 String ExceptionMessages::FormatNumber<double>(double number); 180 String ExceptionMessages::FormatNumber<double>(double number);
184 181
185 } // namespace blink 182 } // namespace blink
186 183
187 #endif // ExceptionMessages_h 184 #endif // ExceptionMessages_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698