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

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

Issue 466283002: Rename parameter providedleastNumMandatoryParams => provided (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 static String invalidArity(const char* expected, unsigned provided); 122 static String invalidArity(const char* expected, unsigned provided);
123 123
124 // If > 0, the argument index that failed type check (1-indexed.) 124 // If > 0, the argument index that failed type check (1-indexed.)
125 // If == 0, a (non-argument) value (e.g., a setter) failed the same check. 125 // If == 0, a (non-argument) value (e.g., a setter) failed the same check.
126 static String notAnArrayTypeArgumentOrValue(int argumentIndex); 126 static String notAnArrayTypeArgumentOrValue(int argumentIndex);
127 static String notASequenceTypeProperty(const String& propertyName); 127 static String notASequenceTypeProperty(const String& propertyName);
128 static String notAFiniteNumber(double value, const char* name = "value provi ded"); 128 static String notAFiniteNumber(double value, const char* name = "value provi ded");
129 static String notAFiniteNumber(const Decimal& value, const char* name = "val ue provided"); 129 static String notAFiniteNumber(const Decimal& value, const char* name = "val ue provided");
130 130
131 static String notEnoughArguments(unsigned expected, unsigned providedleastNu mMandatoryParams); 131 static String notEnoughArguments(unsigned expected, unsigned provided);
132 132
133 static String readOnly(const char* detail = 0); 133 static String readOnly(const char* detail = 0);
134 134
135 private: 135 private:
136 template <typename NumType> 136 template <typename NumType>
137 static String formatFiniteNumber(NumType number) 137 static String formatFiniteNumber(NumType number)
138 { 138 {
139 if (number > 1e20 || number < -1e20) 139 if (number > 1e20 || number < -1e20)
140 return String::format("%e", 1.0*number); 140 return String::format("%e", 1.0*number);
141 return String::number(number); 141 return String::number(number);
(...skipping 13 matching lines...) Expand all
155 155
156 static String ordinalNumber(int number); 156 static String ordinalNumber(int number);
157 }; 157 };
158 158
159 template <> String ExceptionMessages::formatNumber<float>(float number); 159 template <> String ExceptionMessages::formatNumber<float>(float number);
160 template <> String ExceptionMessages::formatNumber<double>(double number); 160 template <> String ExceptionMessages::formatNumber<double>(double number);
161 161
162 } // namespace blink 162 } // namespace blink
163 163
164 #endif // ExceptionMessages_h 164 #endif // ExceptionMessages_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698