| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 OS::StrNCpy(v, message, space); | 1125 OS::StrNCpy(v, message, space); |
| 1126 space -= Min(space, strlen(message)); | 1126 space -= Min(space, strlen(message)); |
| 1127 p = &buffer[kBufferSize] - space; | 1127 p = &buffer[kBufferSize] - space; |
| 1128 | 1128 |
| 1129 for (unsigned i = 0; i < ARRAY_SIZE(args); i++) { | 1129 for (unsigned i = 0; i < ARRAY_SIZE(args); i++) { |
| 1130 if (space > 0) { | 1130 if (space > 0) { |
| 1131 *p++ = ' '; | 1131 *p++ = ' '; |
| 1132 space--; | 1132 space--; |
| 1133 if (space > 0) { | 1133 if (space > 0) { |
| 1134 Handle<String> arg_str = Handle<String>::cast( | 1134 Handle<String> arg_str = Handle<String>::cast( |
| 1135 Object::GetElement(isolate(), args, i)); | 1135 Object::GetElementNoExceptionThrown(isolate(), args, i)); |
| 1136 CHECK_NOT_EMPTY_HANDLE(isolate(), arg_str); | |
| 1137 SmartArrayPointer<char> arg = arg_str->ToCString(); | 1136 SmartArrayPointer<char> arg = arg_str->ToCString(); |
| 1138 Vector<char> v2(p, static_cast<int>(space)); | 1137 Vector<char> v2(p, static_cast<int>(space)); |
| 1139 OS::StrNCpy(v2, arg.get(), space); | 1138 OS::StrNCpy(v2, arg.get(), space); |
| 1140 space -= Min(space, strlen(arg.get())); | 1139 space -= Min(space, strlen(arg.get())); |
| 1141 p = &buffer[kBufferSize] - space; | 1140 p = &buffer[kBufferSize] - space; |
| 1142 } | 1141 } |
| 1143 } | 1142 } |
| 1144 } | 1143 } |
| 1145 if (space > 0) { | 1144 if (space > 0) { |
| 1146 *p = '\0'; | 1145 *p = '\0'; |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 return Handle<Object>::null(); | 2033 return Handle<Object>::null(); |
| 2035 } | 2034 } |
| 2036 | 2035 |
| 2037 | 2036 |
| 2038 Handle<Object> Factory::ToBoolean(bool value) { | 2037 Handle<Object> Factory::ToBoolean(bool value) { |
| 2039 return value ? true_value() : false_value(); | 2038 return value ? true_value() : false_value(); |
| 2040 } | 2039 } |
| 2041 | 2040 |
| 2042 | 2041 |
| 2043 } } // namespace v8::internal | 2042 } } // namespace v8::internal |
| OLD | NEW |