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

Unified Diff: src/messages.js

Issue 120683002: Make `String.prototype.{starts,ends}With` throw when passing a regular expression (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index c7096724ace127053e80327f116de8c3d34ac646..af627eab8c0abee3feff9cfaa3f73d1ef338d1d4 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -113,6 +113,7 @@ var kMessages = {
promise_cyclic: ["Chaining cycle detected for promise", "%0"],
array_functions_on_frozen: ["Cannot modify frozen array elements"],
array_functions_change_sealed: ["Cannot add/remove sealed array elements"],
+ first_argument_not_regexp: ["First argument to ", "%0", " must not be a regular expression"],
// RangeError
invalid_array_length: ["Invalid array length"],
invalid_array_buffer_length: ["Invalid array buffer length"],

Powered by Google App Engine
This is Rietveld 408576698