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

Unified Diff: src/js/string-iterator.js

Issue 1783643002: String.prototype[Symbol.iterator] does RequireObjectCoercible(this) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove RegExp changes accidentally added Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/string-iterator.js
diff --git a/src/js/string-iterator.js b/src/js/string-iterator.js
index 3c331dd1a2da4e99dc0e84be7c9ffa091f01acad..af9af31efd884ef1322c625ed4fc9676e7dd1383 100644
--- a/src/js/string-iterator.js
+++ b/src/js/string-iterator.js
@@ -32,6 +32,7 @@ function StringIterator() {}
// 21.1.5.1 CreateStringIterator Abstract Operation
function CreateStringIterator(string) {
+ CHECK_OBJECT_COERCIBLE(string, 'String.prototype[Symbol.iterator]');
var s = TO_STRING(string);
var iterator = new StringIterator;
SET_PRIVATE(iterator, stringIteratorIteratedStringSymbol, s);
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698