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

Side by Side Diff: src/messages.js

Issue 1019283002: [strong] Check constructor returns (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/parser.cc » ('j') | test/cctest/test-parsing.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 // ------------------------------------------------------------------- 5 // -------------------------------------------------------------------
6 6
7 var kMessages = { 7 var kMessages = {
8 // Error 8 // Error
9 cyclic_proto: ["Cyclic __proto__ value"], 9 cyclic_proto: ["Cyclic __proto__ value"],
10 code_gen_from_strings: ["%0"], 10 code_gen_from_strings: ["%0"],
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 strong_arguments: ["Please don't use 'arguments' in strong mode, use '...args' instead"], 166 strong_arguments: ["Please don't use 'arguments' in strong mode, use '...args' instead"],
167 strong_equal: ["Please don't use '==' or '!=' in strong mode, use '===' or '!==' instead"], 167 strong_equal: ["Please don't use '==' or '!=' in strong mode, use '===' or '!==' instead"],
168 strong_delete: ["Please don't use 'delete' in strong mode, use maps or sets instead"], 168 strong_delete: ["Please don't use 'delete' in strong mode, use maps or sets instead"],
169 strong_var: ["Please don't use 'var' in strong mode, use 'l et' or 'const' instead"], 169 strong_var: ["Please don't use 'var' in strong mode, use 'l et' or 'const' instead"],
170 strong_for_in: ["Please don't use 'for'-'in' loops in strong m ode, use 'for'-'of' instead"], 170 strong_for_in: ["Please don't use 'for'-'in' loops in strong m ode, use 'for'-'of' instead"],
171 strong_empty: ["Please don't use empty sub-statements in stro ng mode, make them explicit with '{}' instead"], 171 strong_empty: ["Please don't use empty sub-statements in stro ng mode, make them explicit with '{}' instead"],
172 strong_use_before_declaration: ["Please declare variable '", "%0", "' before u se in strong mode"], 172 strong_use_before_declaration: ["Please declare variable '", "%0", "' before u se in strong mode"],
173 strong_super_call_missing: ["Please always invoke the super constructor in subclasses in strong mode"], 173 strong_super_call_missing: ["Please always invoke the super constructor in subclasses in strong mode"],
174 strong_super_call_duplicate: ["Please don't invoke the super constructor mul tiple times in strong mode"], 174 strong_super_call_duplicate: ["Please don't invoke the super constructor mul tiple times in strong mode"],
175 strong_super_call_nested: ["Please don't invoke the super constructor nes ted inside another statement or expression in strong mode"], 175 strong_super_call_nested: ["Please don't invoke the super constructor nes ted inside another statement or expression in strong mode"],
176 strong_constructor_return_value: ["Please do not return a value from a constru ctor in strong mode"],
Dmitry Lomov (no reviews) 2015/03/19 13:59:41 Why do we keep pleading with users here?
adamk 2015/03/19 14:04:11 Drive-by +1 here. The "please" sounds odd for some
rossberg 2015/03/19 16:02:57 Strong mode intentionally has the mostly friendly
177 strong_constructor_return_misplaced: ["Please do not return from a constructor before its super constructor invocation in strong mode"],
176 sloppy_lexical: ["Block-scoped declarations (let, const, functi on, class) not yet supported outside strict mode"], 178 sloppy_lexical: ["Block-scoped declarations (let, const, functi on, class) not yet supported outside strict mode"],
177 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter list"], 179 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter list"],
178 generator_poison_pill: ["'caller' and 'arguments' properties may not b e accessed on generator functions."], 180 generator_poison_pill: ["'caller' and 'arguments' properties may not b e accessed on generator functions."],
179 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"], 181 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj ect with external array elements"],
180 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"], 182 redef_external_array_element: ["Cannot redefine a property of an object with external array elements"],
181 const_assign: ["Assignment to constant variable."], 183 const_assign: ["Assignment to constant variable."],
182 symbol_to_string: ["Cannot convert a Symbol value to a string"], 184 symbol_to_string: ["Cannot convert a Symbol value to a string"],
183 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"], 185 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"],
184 symbol_to_number: ["Cannot convert a Symbol value to a number"], 186 symbol_to_number: ["Cannot convert a Symbol value to a number"],
185 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], 187 module_export_undefined: ["Export '", "%0", "' is not defined in module" ],
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 function SetUpStackOverflowBoilerplate() { 1325 function SetUpStackOverflowBoilerplate() {
1324 var boilerplate = MakeRangeError('stack_overflow', []); 1326 var boilerplate = MakeRangeError('stack_overflow', []);
1325 1327
1326 %DefineAccessorPropertyUnchecked( 1328 %DefineAccessorPropertyUnchecked(
1327 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); 1329 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM);
1328 1330
1329 return boilerplate; 1331 return boilerplate;
1330 } 1332 }
1331 1333
1332 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); 1334 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate();
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | test/cctest/test-parsing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698