Snapshots: Don't use an empty array where a NULL array is expected. (flutter/engine#3361)

Fixes dart-lang/sdk#28504
This commit is contained in:
Ryan Macnak
2017-01-24 18:26:21 -08:00
committed by GitHub
parent de44f803ae
commit c3c478ec69
3 changed files with 17 additions and 13 deletions

View File

@@ -10,16 +10,20 @@
// generated snapshot binary file for the vm isolate.
// This string forms the content of the dart vm isolate snapshot which
// is loaded into the vm isolate.
const uint8_t kDartVmSnapshotData[]
__attribute__((visibility("default"), aligned(8), used)) = { %s };
const uint8_t kDartVmSnapshotInstructions[]
__attribute__((visibility("default"), aligned(8), used)) = {};
static const uint8_t kDartVmSnapshotData_[]
__attribute__((aligned(8))) = { %s };
const uint8_t* kDartVmSnapshotData
__attribute__((visibility("default"), used)) = kDartVmSnapshotData_;
const uint8_t* kDartVmSnapshotInstructions
__attribute__((visibility("default"), used)) = NULL;
// The string on the next line will be filled in with the contents of the
// generated snapshot binary file for a regular dart isolate.
// This string forms the content of a regular dart isolate snapshot which
// is loaded into an isolate when it is created.
const uint8_t kDartIsolateSnapshotData[]
__attribute__((visibility("default"), aligned(8), used)) = { %s };
const uint8_t kDartIsolateSnapshotInstructions[]
__attribute__((visibility("default"), aligned(8), used)) = {};
static const uint8_t kDartIsolateSnapshotData_[]
__attribute__((aligned(8))) = { %s };
const uint8_t* kDartIsolateSnapshotData
__attribute__((visibility("default"), used)) = kDartIsolateSnapshotData_;
const uint8_t* kDartIsolateSnapshotInstructions
__attribute__((visibility("default"), used)) = NULL;

View File

@@ -36,7 +36,7 @@ extern void* kDartIsolateSnapshotData;
extern void* kDartIsolateSnapshotInstructions;
}
#define DART_SYMBOL(symbol) (&symbol)
#define DART_SYMBOL(symbol) (symbol)
#endif // DART_ALLOW_DYNAMIC_RESOLUTION

View File

@@ -24,10 +24,10 @@
#include "lib/tonic/file_loader/file_loader.h"
extern "C" {
extern const uint8_t kDartVmSnapshotData[];
extern const uint8_t kDartVmSnapshotInstructions[];
extern const uint8_t kDartIsolateSnapshotData[];
extern const uint8_t kDartIsolateSnapshotInstructions[];
extern const uint8_t* kDartVmSnapshotData;
extern const uint8_t* kDartVmSnapshotInstructions;
extern const uint8_t* kDartIsolateSnapshotData;
extern const uint8_t* kDartIsolateSnapshotInstructions;
}
namespace {