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

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

Issue 2695403003: Undo rename of LoadExtensionLibrary to LoadLibrary since mangling on Windows seems to create a conf… (Closed)
Patch Set: comment Created 3 years, 10 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 | « runtime/bin/extensions_win.cc ('k') | runtime/bin/vmservice_dartium.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 "bin/snapshot_utils.h" 5 #include "bin/snapshot_utils.h"
6 6
7 #include "bin/dartutils.h" 7 #include "bin/dartutils.h"
8 #include "bin/error_exit.h" 8 #include "bin/error_exit.h"
9 #include "bin/extensions.h" 9 #include "bin/extensions.h"
10 #include "bin/file.h" 10 #include "bin/file.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 private: 184 private:
185 void* library_; 185 void* library_;
186 const uint8_t* vm_snapshot_data_; 186 const uint8_t* vm_snapshot_data_;
187 const uint8_t* vm_snapshot_instructions_; 187 const uint8_t* vm_snapshot_instructions_;
188 const uint8_t* isolate_snapshot_data_; 188 const uint8_t* isolate_snapshot_data_;
189 const uint8_t* isolate_snapshot_instructions_; 189 const uint8_t* isolate_snapshot_instructions_;
190 }; 190 };
191 191
192 192
193 static AppSnapshot* TryReadAppSnapshotDynamicLibrary(const char* script_name) { 193 static AppSnapshot* TryReadAppSnapshotDynamicLibrary(const char* script_name) {
194 void* library = Extensions::LoadLibrary(script_name); 194 void* library = Extensions::LoadExtensionLibrary(script_name);
195 if (library == NULL) { 195 if (library == NULL) {
196 return NULL; 196 return NULL;
197 } 197 }
198 198
199 const uint8_t* vm_data_buffer = reinterpret_cast<const uint8_t*>( 199 const uint8_t* vm_data_buffer = reinterpret_cast<const uint8_t*>(
200 Extensions::ResolveSymbol(library, kVmSnapshotDataSymbolName)); 200 Extensions::ResolveSymbol(library, kVmSnapshotDataSymbolName));
201 if (vm_data_buffer == NULL) { 201 if (vm_data_buffer == NULL) {
202 FATAL1("Failed to resolve symbol '%s'\n", kVmSnapshotDataSymbolName); 202 FATAL1("Failed to resolve symbol '%s'\n", kVmSnapshotDataSymbolName);
203 } 203 }
204 204
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 Dart_Handle result = 406 Dart_Handle result =
407 Dart_CreateAppAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size); 407 Dart_CreateAppAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size);
408 if (Dart_IsError(result)) { 408 if (Dart_IsError(result)) {
409 ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result)); 409 ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
410 } 410 }
411 WriteSnapshotFile(snapshot_filename, false, assembly_buffer, assembly_size); 411 WriteSnapshotFile(snapshot_filename, false, assembly_buffer, assembly_size);
412 } 412 }
413 413
414 } // namespace bin 414 } // namespace bin
415 } // namespace dart 415 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/extensions_win.cc ('k') | runtime/bin/vmservice_dartium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698