Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
| 7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1476 } | 1476 } |
| 1477 if (isolate_snapshot_size == NULL) { | 1477 if (isolate_snapshot_size == NULL) { |
| 1478 RETURN_NULL_ERROR(isolate_snapshot_size); | 1478 RETURN_NULL_ERROR(isolate_snapshot_size); |
| 1479 } | 1479 } |
| 1480 // Finalize all classes if needed. | 1480 // Finalize all classes if needed. |
| 1481 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); | 1481 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); |
| 1482 if (::Dart_IsError(state)) { | 1482 if (::Dart_IsError(state)) { |
| 1483 return state; | 1483 return state; |
| 1484 } | 1484 } |
| 1485 I->heap()->CollectAllGarbage(); | 1485 I->heap()->CollectAllGarbage(); |
| 1486 if (I->background_compiler() != NULL) { | |
| 1487 BackgroundCompiler::Stop(I->background_compiler()); | |
| 1488 } | |
|
siva
2016/04/04 22:45:38
I was thinking of adding an Isolate::StopBackgroun
srdjan
2016/04/04 23:22:49
Done.
| |
| 1489 | |
| 1486 #if defined(DEBUG) | 1490 #if defined(DEBUG) |
| 1487 FunctionVisitor check_canonical(T); | 1491 FunctionVisitor check_canonical(T); |
| 1488 I->heap()->IterateObjects(&check_canonical); | 1492 I->heap()->IterateObjects(&check_canonical); |
| 1489 #endif // #if defined(DEBUG). | 1493 #endif // #if defined(DEBUG). |
| 1490 | 1494 |
| 1491 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, | 1495 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, |
| 1492 isolate_snapshot_buffer, | 1496 isolate_snapshot_buffer, |
| 1493 NULL, /* instructions_snapshot_buffer */ | 1497 NULL, /* instructions_snapshot_buffer */ |
| 1494 ApiReallocate, | 1498 ApiReallocate, |
| 1495 false, /* snapshot_code */ | 1499 false, /* snapshot_code */ |
| (...skipping 4615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6111 return Api::Success(); | 6115 return Api::Success(); |
| 6112 } | 6116 } |
| 6113 #endif // DART_PRECOMPILER | 6117 #endif // DART_PRECOMPILER |
| 6114 | 6118 |
| 6115 | 6119 |
| 6116 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6120 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 6117 return Dart::IsRunningPrecompiledCode(); | 6121 return Dart::IsRunningPrecompiledCode(); |
| 6118 } | 6122 } |
| 6119 | 6123 |
| 6120 } // namespace dart | 6124 } // namespace dart |
| OLD | NEW |