| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } | 250 } |
| 251 | 251 |
| 252 return true; | 252 return true; |
| 253 } | 253 } |
| 254 | 254 |
| 255 | 255 |
| 256 int main(int argc, char* argv[]) { | 256 int main(int argc, char* argv[]) { |
| 257 v8::V8::InitializeICU(); | 257 v8::V8::InitializeICU(); |
| 258 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); | 258 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); |
| 259 v8::V8::InitializePlatform(platform); | 259 v8::V8::InitializePlatform(platform); |
| 260 v8::V8::Initialize(); | |
| 261 int result = RunMain(argc, argv); | 260 int result = RunMain(argc, argv); |
| 262 v8::V8::Dispose(); | 261 v8::V8::Dispose(); |
| 263 v8::V8::ShutdownPlatform(); | 262 v8::V8::ShutdownPlatform(); |
| 264 delete platform; | 263 delete platform; |
| 265 return result; | 264 return result; |
| 266 } | 265 } |
| 267 | 266 |
| 268 | 267 |
| 269 // Extracts a C string from a V8 Utf8Value. | 268 // Extracts a C string from a V8 Utf8Value. |
| 270 const char* ToCString(const v8::String::Utf8Value& value) { | 269 const char* ToCString(const v8::String::Utf8Value& value) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 375 } |
| 377 // Remove newline char | 376 // Remove newline char |
| 378 for (char* pos = buffer; *pos != '\0'; pos++) { | 377 for (char* pos = buffer; *pos != '\0'; pos++) { |
| 379 if (*pos == '\n') { | 378 if (*pos == '\n') { |
| 380 *pos = '\0'; | 379 *pos = '\0'; |
| 381 break; | 380 break; |
| 382 } | 381 } |
| 383 } | 382 } |
| 384 return v8::String::NewFromUtf8(isolate, buffer); | 383 return v8::String::NewFromUtf8(isolate, buffer); |
| 385 } | 384 } |
| OLD | NEW |