Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index c5521063dd6b8bf31d400e142c39e37e2719c665..9d12145a014efba969024dee105a24da80987df8 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -9329,10 +9329,15 @@ class String: public Name { |
| MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x, |
| Handle<String> y); |
| + // Perform ES6 21.1.3.8, including checking arguments. |
| + static Object* IndexOf(Isolate* isolate, Handle<Object> receiver, |
| + Handle<Object> search, |
| + Handle<Object> position); |
| // Perform string match of pattern on subject, starting at start index. |
| - // Caller must ensure that 0 <= start_index <= sub->length(). |
| - static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat, |
| - int start_index); |
| + // Caller must ensure that 0 <= start_index <= sub->length(), as this does not |
| + // check any arguments. |
| + static int IndexOf(Isolate* isolate, Handle<String> receiver, |
|
Franzi
2016/09/23 11:37:00
Is the inner function only used inside Object* Ind
|
| + Handle<String> search, int start_index); |
| static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver, |
| Handle<Object> search, Handle<Object> position); |