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

Side by Side Diff: runtime/bin/extensions_android.cc

Issue 2622053002: Refactor snapshots pieces to include a section for loading instructions into the heap of a regular … (Closed)
Patch Set: . Created 3 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/bin/extensions_fuchsia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_ANDROID) 6 #if defined(TARGET_OS_ANDROID)
7 7
8 #include "bin/extensions.h" 8 #include "bin/extensions.h"
9 #include <dlfcn.h> // NOLINT 9 #include <dlfcn.h> // NOLINT
10 10
11 namespace dart { 11 namespace dart {
12 namespace bin { 12 namespace bin {
13 13
14 const char* kPrecompiledVMIsolateSymbolName = "_kVmIsolateSnapshot"; 14 const char* kVmSnapshotDataSymbolName = "_kDartVmSnapshotData";
15 const char* kPrecompiledIsolateSymbolName = "_kIsolateSnapshot"; 15 const char* kVmSnapshotInstructionsSymbolName = "_kDartVmSnapshotInstructions";
16 const char* kPrecompiledInstructionsSymbolName = "_kInstructionsSnapshot"; 16 const char* kIsolateSnapshotDataSymbolName = "_kDartIsolateSnapshotData";
17 const char* kPrecompiledDataSymbolName = "_kDataSnapshot"; 17 const char* kIsolateSnapshotInstructionsSymbolName =
18 "_kDartIsolateSnapshotInstructions";
18 19
19 void* Extensions::LoadExtensionLibrary(const char* library_file) { 20 void* Extensions::LoadExtensionLibrary(const char* library_file) {
20 return dlopen(library_file, RTLD_LAZY); 21 return dlopen(library_file, RTLD_LAZY);
21 } 22 }
22 23
23 void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) { 24 void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
24 dlerror(); 25 dlerror();
25 return dlsym(lib_handle, symbol); 26 return dlsym(lib_handle, symbol);
26 } 27 }
27 28
28 Dart_Handle Extensions::GetError() { 29 Dart_Handle Extensions::GetError() {
29 const char* err_str = dlerror(); 30 const char* err_str = dlerror();
30 if (err_str != NULL) { 31 if (err_str != NULL) {
31 return Dart_NewApiError(err_str); 32 return Dart_NewApiError(err_str);
32 } 33 }
33 return Dart_Null(); 34 return Dart_Null();
34 } 35 }
35 36
36 } // namespace bin 37 } // namespace bin
37 } // namespace dart 38 } // namespace dart
38 39
39 #endif // defined(TARGET_OS_ANDROID) 40 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/extensions_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698