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

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

Issue 216633002: Reduce type-impedance for ExceptionMessages::failedTo* functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/v8/ExceptionMessages.cpp » ('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 29 matching lines...) Expand all
40 class Decimal; 40 class Decimal;
41 41
42 class ExceptionMessages { 42 class ExceptionMessages {
43 public: 43 public:
44 enum BoundType { 44 enum BoundType {
45 InclusiveBound, 45 InclusiveBound,
46 ExclusiveBound, 46 ExclusiveBound,
47 }; 47 };
48 48
49 static String argumentNullOrIncorrectType(int argumentIndex, const String& e xpectedType); 49 static String argumentNullOrIncorrectType(int argumentIndex, const String& e xpectedType);
50 static String constructorNotCallableAsFunction(const String& type); 50 static String constructorNotCallableAsFunction(const char* type);
51 51
52 static String failedToConstruct(const String& type, const String& detail); 52 static String failedToConstruct(const char* type, const String& detail);
53 static String failedToEnumerate(const String& type, const String& detail); 53 static String failedToEnumerate(const char* type, const String& detail);
54 static String failedToExecute(const String& method, const String& type, cons t String& detail); 54 static String failedToExecute(const char* method, const char* type, const St ring& detail);
55 static String failedToGet(const String& property, const String& type, const String& detail); 55 static String failedToGet(const char* property, const char* type, const Stri ng& detail);
56 static String failedToSet(const String& property, const String& type, const String& detail); 56 static String failedToSet(const char* property, const char* type, const Stri ng& detail);
57 static String failedToDelete(const String& property, const String& type, con st String& detail); 57 static String failedToDelete(const char* property, const char* type, const S tring& detail);
58 static String failedToGetIndexed(const String& type, const String& detail); 58 static String failedToGetIndexed(const char* type, const String& detail);
59 static String failedToSetIndexed(const String& type, const String& detail); 59 static String failedToSetIndexed(const char* type, const String& detail);
60 static String failedToDeleteIndexed(const String& type, const String& detail ); 60 static String failedToDeleteIndexed(const char* type, const String& detail);
61 61
62 template <typename NumType> 62 template <typename NumType>
63 static String formatNumber(NumType number) 63 static String formatNumber(NumType number)
64 { 64 {
65 return formatFiniteNumber(number); 65 return formatFiniteNumber(number);
66 } 66 }
67 67
68 static String incorrectPropertyType(const String& property, const String& de tail); 68 static String incorrectPropertyType(const String& property, const String& de tail);
69 69
70 template <typename NumberType> 70 template <typename NumberType>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 static String ordinalNumber(int number); 154 static String ordinalNumber(int number);
155 }; 155 };
156 156
157 template <> String ExceptionMessages::formatNumber<float>(float number); 157 template <> String ExceptionMessages::formatNumber<float>(float number);
158 template <> String ExceptionMessages::formatNumber<double>(double number); 158 template <> String ExceptionMessages::formatNumber<double>(double number);
159 159
160 } // namespace WebCore 160 } // namespace WebCore
161 161
162 #endif // ExceptionMessages_h 162 #endif // ExceptionMessages_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/ExceptionMessages.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698