Index: src/builtins/builtins-string.cc |
diff --git a/src/builtins/builtins-string.cc b/src/builtins/builtins-string.cc |
index 865b5cbc08d725be2c2db6b1d95d7bdb3d3aa642..97c398f27479a3cef229a1713a6b64d629981644 100644 |
--- a/src/builtins/builtins-string.cc |
+++ b/src/builtins/builtins-string.cc |
@@ -781,6 +781,15 @@ void Builtins::Generate_StringPrototypeCharCodeAt( |
assembler->Return(result); |
} |
+// ES6 section 21.1.3.8 String.prototype.indexOf ( searchString [ , position ] ) |
+BUILTIN(StringPrototypeIndexOf) { |
+ HandleScope handle_scope(isolate); |
+ |
+ return String::IndexOf(isolate, args.receiver(), |
+ args.atOrUndefined(isolate, 1), |
+ args.atOrUndefined(isolate, 2)); |
+} |
+ |
// ES6 section 21.1.3.9 |
// String.prototype.lastIndexOf ( searchString [ , position ] ) |
BUILTIN(StringPrototypeLastIndexOf) { |