| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index 9b83543416b0533da26a5c3cd31e2d014e90c0b1..202eb97364d4609c0f453e84abec89355c7d8ba4 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -1204,6 +1204,10 @@ static Dart_Isolate CreateIsolate(const char* script_uri,
|
| return reinterpret_cast<Dart_Isolate>(NULL);
|
| }
|
|
|
| +DART_EXPORT void Dart_IsolateFlagsInitialize(Dart_IsolateFlags* flags) {
|
| + Isolate::FlagsInitialize(flags);
|
| +}
|
| +
|
| DART_EXPORT Dart_Isolate
|
| Dart_CreateIsolate(const char* script_uri,
|
| const char* main,
|
| @@ -6733,6 +6737,37 @@ Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer,
|
| #endif
|
| }
|
|
|
| +DART_EXPORT Dart_Handle Dart_GetObfuscationMap(uint8_t** buffer,
|
| + intptr_t* buffer_length) {
|
| +#if defined(DART_PRECOMPILED_RUNTIME)
|
| + return Api::NewError("No obfuscation map to save on an AOT runtime.");
|
| +#else
|
| + Thread* thread = Thread::Current();
|
| + DARTSCOPE(thread);
|
| + Isolate* isolate = thread->isolate();
|
| +
|
| + if (buffer == NULL) {
|
| + RETURN_NULL_ERROR(buffer);
|
| + }
|
| + if (buffer_length == NULL) {
|
| + RETURN_NULL_ERROR(buffer_length);
|
| + }
|
| +
|
| + JSONStream js_stream;
|
| + {
|
| + JSONArray js_map(&js_stream);
|
| + if (isolate->obfuscation_map() != NULL) {
|
| + for (intptr_t i = 0; isolate->obfuscation_map()[i] != NULL; i++) {
|
| + js_map.AddValue(isolate->obfuscation_map()[i]);
|
| + }
|
| + }
|
| + }
|
| +
|
| + js_stream.Steal(reinterpret_cast<char**>(buffer), buffer_length);
|
| + return Api::Success();
|
| +#endif
|
| +}
|
| +
|
| DART_EXPORT bool Dart_IsPrecompiledRuntime() {
|
| #if defined(DART_PRECOMPILED_RUNTIME)
|
| return true;
|
|
|