| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 for (int i = 0; i < args.length(); i++) { | 1250 for (int i = 0; i < args.length(); i++) { |
| 1251 i::JSArray::SetElement( | 1251 i::JSArray::SetElement( |
| 1252 args_array, i, v8::Utils::OpenHandle(*v8::String::NewFromUtf8( | 1252 args_array, i, v8::Utils::OpenHandle(*v8::String::NewFromUtf8( |
| 1253 CcTest::isolate(), args[i])), | 1253 CcTest::isolate(), args[i])), |
| 1254 NONE, i::SLOPPY).Check(); | 1254 NONE, i::SLOPPY).Check(); |
| 1255 } | 1255 } |
| 1256 i::Handle<i::JSObject> builtins(isolate->js_builtins_object()); | 1256 i::Handle<i::JSObject> builtins(isolate->js_builtins_object()); |
| 1257 i::Handle<i::Object> format_fun = | 1257 i::Handle<i::Object> format_fun = |
| 1258 i::GetProperty(builtins, "FormatMessage").ToHandleChecked(); | 1258 i::GetProperty(builtins, "FormatMessage").ToHandleChecked(); |
| 1259 i::Handle<i::Object> arg_handles[] = { format, args_array }; | 1259 i::Handle<i::Object> arg_handles[] = { format, args_array }; |
| 1260 bool has_exception = false; | |
| 1261 i::Handle<i::Object> result = i::Execution::Call( | 1260 i::Handle<i::Object> result = i::Execution::Call( |
| 1262 isolate, format_fun, builtins, 2, arg_handles, &has_exception); | 1261 isolate, format_fun, builtins, 2, arg_handles).ToHandleChecked(); |
| 1263 CHECK(!has_exception); | |
| 1264 CHECK(result->IsString()); | 1262 CHECK(result->IsString()); |
| 1265 for (int i = 0; i < args.length(); i++) { | 1263 for (int i = 0; i < args.length(); i++) { |
| 1266 i::DeleteArray(args[i]); | 1264 i::DeleteArray(args[i]); |
| 1267 } | 1265 } |
| 1268 i::DeleteArray(args.start()); | 1266 i::DeleteArray(args.start()); |
| 1269 i::DeleteArray(message); | 1267 i::DeleteArray(message); |
| 1270 return i::Handle<i::String>::cast(result); | 1268 return i::Handle<i::String>::cast(result); |
| 1271 } | 1269 } |
| 1272 | 1270 |
| 1273 | 1271 |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); | 2567 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); |
| 2570 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, | 2568 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, |
| 2571 kError); | 2569 kError); |
| 2572 | 2570 |
| 2573 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); | 2571 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); |
| 2574 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); | 2572 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); |
| 2575 | 2573 |
| 2576 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); | 2574 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); |
| 2577 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); | 2575 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); |
| 2578 } | 2576 } |
| OLD | NEW |