| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 void initialize() | 452 void initialize() |
| 453 { | 453 { |
| 454 // The browser initiates DOM isolates directly. | 454 // The browser initiates DOM isolates directly. |
| 455 } | 455 } |
| 456 | 456 |
| 457 bool domEnabled() { return true; } | 457 bool domEnabled() { return true; } |
| 458 }; | 458 }; |
| 459 | 459 |
| 460 | 460 |
| 461 Dart_Isolate DartController::createPureIsolateCallback(const char* scriptURL, co
nst char* entryPoint, const char* packageRoot, const char** packageMap, Dart_Iso
lateFlags* flags, void* data, char** errorMsg) | 461 Dart_Isolate DartController::createPureIsolateCallback(const char* scriptURL, co
nst char* entryPoint, const char* packageRoot, const char* packageConfig, Dart_I
solateFlags* flags, void* data, char** errorMsg) |
| 462 { | 462 { |
| 463 bool isSpawnUri = scriptURL ? true : false; | 463 bool isSpawnUri = scriptURL ? true : false; |
| 464 | 464 |
| 465 if (isSpawnUri && strcmp(scriptURL, DART_VM_SERVICE_ISOLATE_NAME) == 0) { | 465 if (isSpawnUri && strcmp(scriptURL, DART_VM_SERVICE_ISOLATE_NAME) == 0) { |
| 466 return DartService::CreateIsolate(); | 466 return DartService::CreateIsolate(); |
| 467 } | 467 } |
| 468 | 468 |
| 469 if (isSpawnUri && !WTF::isMainThread()) { | 469 if (isSpawnUri && !WTF::isMainThread()) { |
| 470 // FIXME(14463): We need to forward this request to the main thread to f
etch the URI. | 470 // FIXME(14463): We need to forward this request to the main thread to f
etch the URI. |
| 471 *errorMsg = strdup("spawnUri is not yet supported on background isolates
."); | 471 *errorMsg = strdup("spawnUri is not yet supported on background isolates
."); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 Dart_ExitIsolate(); | 1051 Dart_ExitIsolate(); |
| 1052 loader->processSingleRequest(isolate, url, callback); | 1052 loader->processSingleRequest(isolate, url, callback); |
| 1053 | 1053 |
| 1054 // Restore caller isolate. | 1054 // Restore caller isolate. |
| 1055 Dart_EnterIsolate(caller); | 1055 Dart_EnterIsolate(caller); |
| 1056 | 1056 |
| 1057 // FIXME: We need some way to return a Dart_Handle to the isolate we just cr
eated. | 1057 // FIXME: We need some way to return a Dart_Handle to the isolate we just cr
eated. |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 } | 1060 } |
| OLD | NEW |