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 6261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6272 ? URIUnescape::Unescape<uint8_t>(isolate, source) | 6272 ? URIUnescape::Unescape<uint8_t>(isolate, source) |
6273 : URIUnescape::Unescape<uc16>(isolate, source)); | 6273 : URIUnescape::Unescape<uc16>(isolate, source)); |
6274 return *result; | 6274 return *result; |
6275 } | 6275 } |
6276 | 6276 |
6277 | 6277 |
6278 RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONString) { | 6278 RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONString) { |
6279 HandleScope scope(isolate); | 6279 HandleScope scope(isolate); |
6280 CONVERT_ARG_HANDLE_CHECKED(String, string, 0); | 6280 CONVERT_ARG_HANDLE_CHECKED(String, string, 0); |
6281 ASSERT(args.length() == 1); | 6281 ASSERT(args.length() == 1); |
6282 return BasicJsonStringifier::StringifyString(isolate, string); | 6282 Handle<Object> result; |
| 6283 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 6284 isolate, result, BasicJsonStringifier::StringifyString(isolate, string)); |
| 6285 return *result; |
6283 } | 6286 } |
6284 | 6287 |
6285 | 6288 |
6286 RUNTIME_FUNCTION(MaybeObject*, Runtime_BasicJSONStringify) { | 6289 RUNTIME_FUNCTION(MaybeObject*, Runtime_BasicJSONStringify) { |
6287 HandleScope scope(isolate); | 6290 HandleScope scope(isolate); |
6288 ASSERT(args.length() == 1); | 6291 ASSERT(args.length() == 1); |
6289 BasicJsonStringifier stringifier(isolate); | 6292 BasicJsonStringifier stringifier(isolate); |
6290 return stringifier.Stringify(Handle<Object>(args[0], isolate)); | 6293 Handle<Object> result; |
| 6294 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 6295 isolate, result, stringifier.Stringify(args.at<Object>(0))); |
| 6296 return *result; |
6291 } | 6297 } |
6292 | 6298 |
6293 | 6299 |
6294 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) { | 6300 RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) { |
6295 HandleScope handle_scope(isolate); | 6301 HandleScope handle_scope(isolate); |
6296 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0); | 6302 CONVERT_ARG_HANDLE_CHECKED(String, subject, 0); |
6297 CONVERT_NUMBER_CHECKED(int, radix, Int32, args[1]); | 6303 CONVERT_NUMBER_CHECKED(int, radix, Int32, args[1]); |
6298 RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36)); | 6304 RUNTIME_ASSERT(radix == 0 || (2 <= radix && radix <= 36)); |
6299 | 6305 |
6300 subject = String::Flatten(subject); | 6306 subject = String::Flatten(subject); |
(...skipping 8803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15104 } | 15110 } |
15105 } | 15111 } |
15106 | 15112 |
15107 | 15113 |
15108 void Runtime::OutOfMemory() { | 15114 void Runtime::OutOfMemory() { |
15109 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); | 15115 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); |
15110 UNREACHABLE(); | 15116 UNREACHABLE(); |
15111 } | 15117 } |
15112 | 15118 |
15113 } } // namespace v8::internal | 15119 } } // namespace v8::internal |
OLD | NEW |