| OLD | NEW |
| 1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 init_params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION; | 737 init_params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION; |
| 738 init_params.vm_isolate_snapshot = DartUtilities::vmIsolateSnapshot(); | 738 init_params.vm_isolate_snapshot = DartUtilities::vmIsolateSnapshot(); |
| 739 init_params.create = &createPureIsolateCallback; | 739 init_params.create = &createPureIsolateCallback; |
| 740 init_params.file_open = openFileCallback; | 740 init_params.file_open = openFileCallback; |
| 741 init_params.file_read = readFileCallback; | 741 init_params.file_read = readFileCallback; |
| 742 init_params.file_write = writeFileCallback; | 742 init_params.file_write = writeFileCallback; |
| 743 init_params.file_close = closeFileCallback; | 743 init_params.file_close = closeFileCallback; |
| 744 init_params.entropy_source = generateEntropy; | 744 init_params.entropy_source = generateEntropy; |
| 745 init_params.get_service_assets = GetVMServiceAssetsArchiveCallback; | 745 init_params.get_service_assets = GetVMServiceAssetsArchiveCallback; |
| 746 char* error = Dart_Initialize(&init_params); | 746 char* error = Dart_Initialize(&init_params); |
| 747 RELEASE_ASSERT_WITH_MESSAGE(!error, error); | 747 RELEASE_ASSERT_WITH_MESSAGE(!error, "Dart_Initialize failed"); |
| 748 } | 748 } |
| 749 | 749 |
| 750 static bool checkForExpiration() | 750 static bool checkForExpiration() |
| 751 { | 751 { |
| 752 const time_t ExpirationTimeSecsSinceEpoch = | 752 const time_t ExpirationTimeSecsSinceEpoch = |
| 753 #include "bindings/dart/ExpirationTimeSecsSinceEpoch.time_t" | 753 #include "bindings/dart/ExpirationTimeSecsSinceEpoch.time_t" |
| 754 ; | 754 ; |
| 755 const char* override = getenv("DARTIUM_EXPIRATION_TIME"); | 755 const char* override = getenv("DARTIUM_EXPIRATION_TIME"); |
| 756 time_t expiration; | 756 time_t expiration; |
| 757 if (override) { | 757 if (override) { |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 Dart_ExitIsolate(); | 1010 Dart_ExitIsolate(); |
| 1011 loader->processSingleRequest(isolate, url, callback); | 1011 loader->processSingleRequest(isolate, url, callback); |
| 1012 | 1012 |
| 1013 // Restore caller isolate. | 1013 // Restore caller isolate. |
| 1014 Dart_EnterIsolate(caller); | 1014 Dart_EnterIsolate(caller); |
| 1015 | 1015 |
| 1016 // FIXME: We need some way to return a Dart_Handle to the isolate we just cr
eated. | 1016 // FIXME: We need some way to return a Dart_Handle to the isolate we just cr
eated. |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 } | 1019 } |
| OLD | NEW |