| Index: src/runtime/runtime-date.cc
|
| diff --git a/src/runtime/runtime-date.cc b/src/runtime/runtime-date.cc
|
| index 4d238b443e2ed0a0e7582891a1721006bdf763d1..b4ed6bd33f4439806e437d08fe834426ddf246f6 100644
|
| --- a/src/runtime/runtime-date.cc
|
| +++ b/src/runtime/runtime-date.cc
|
| @@ -100,8 +100,8 @@ RUNTIME_FUNCTION(Runtime_DateCurrentTime) {
|
|
|
| RUNTIME_FUNCTION(Runtime_DateParseString) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 2);
|
| - CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
|
| + DCHECK_EQ(2, args.length());
|
| + CONVERT_ARG_HANDLE_CHECKED(Object, input, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, output, 1);
|
|
|
| RUNTIME_ASSERT(output->HasFastElements());
|
| @@ -110,6 +110,10 @@ RUNTIME_FUNCTION(Runtime_DateParseString) {
|
| Handle<FixedArray> output_array(FixedArray::cast(output->elements()));
|
| RUNTIME_ASSERT(output_array->length() >= DateParser::OUTPUT_SIZE);
|
|
|
| + Handle<String> str;
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, str,
|
| + Object::ToString(isolate, input));
|
| +
|
| str = String::Flatten(str);
|
| DisallowHeapAllocation no_gc;
|
|
|
|
|