Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2584943002: Remove Dart_CreateLibrarySnapshot. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 2bec82533531ee0781624ea9868de20ec54dcead..2a273b3cd0e7816a9ecb35fcc38f55a043515941 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1586,9 +1586,9 @@ Dart_CreateSnapshot(uint8_t** vm_isolate_snapshot_buffer,
}
-static Dart_Handle createLibrarySnapshot(Dart_Handle library,
- uint8_t** buffer,
- intptr_t* size) {
+DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
+ intptr_t* size) {
+ API_TIMELINE_DURATION;
DARTSCOPE(Thread::Current());
Isolate* I = T->isolate();
if (buffer == NULL) {
@@ -1602,12 +1602,7 @@ static Dart_Handle createLibrarySnapshot(Dart_Handle library,
if (::Dart_IsError(state)) {
return state;
}
- Library& lib = Library::Handle(Z);
- if (library == Dart_Null()) {
- lib ^= I->object_store()->root_library();
- } else {
- lib ^= Api::UnwrapHandle(library);
- }
+ Library& lib = Library::Handle(Z, I->object_store()->root_library());
#if defined(DEBUG)
I->heap()->CollectAllGarbage();
@@ -1622,21 +1617,6 @@ static Dart_Handle createLibrarySnapshot(Dart_Handle library,
}
-DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
- intptr_t* size) {
- API_TIMELINE_DURATION;
- return createLibrarySnapshot(Dart_Null(), buffer, size);
-}
-
-
-DART_EXPORT Dart_Handle Dart_CreateLibrarySnapshot(Dart_Handle library,
- uint8_t** buffer,
- intptr_t* size) {
- API_TIMELINE_DURATION;
- return createLibrarySnapshot(library, buffer, size);
-}
-
-
DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate) {
if (isolate == NULL) {
FATAL1("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC);
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698