d33e51df3c
It relies on flutter copy of clang distribution, same one that is used to build flutter/engine. It addressed several deprecated warnings from clang compiler for functions like strdup, unlink, etc. It allows few warnings still since they are triggered in third_party sources. Change-Id: Ieb13792c011438d46dbbc0fa030e1b5e4ea14315 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142704 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "bin/isolate_data.h"
|
|
#include "bin/snapshot_utils.h"
|
|
#include "platform/growable_array.h"
|
|
|
|
namespace dart {
|
|
namespace bin {
|
|
|
|
IsolateGroupData::IsolateGroupData(const char* url,
|
|
const char* packages_file,
|
|
AppSnapshot* app_snapshot,
|
|
bool isolate_run_app_snapshot)
|
|
: script_url((url != NULL) ? Utils::StrDup(url) : NULL),
|
|
app_snapshot_(app_snapshot),
|
|
resolved_packages_config_(NULL),
|
|
kernel_buffer_(NULL),
|
|
kernel_buffer_size_(0),
|
|
isolate_run_app_snapshot_(isolate_run_app_snapshot) {
|
|
if (packages_file != NULL) {
|
|
packages_file_ = Utils::StrDup(packages_file);
|
|
}
|
|
}
|
|
|
|
IsolateGroupData::~IsolateGroupData() {
|
|
free(script_url);
|
|
script_url = NULL;
|
|
free(packages_file_);
|
|
packages_file_ = NULL;
|
|
free(resolved_packages_config_);
|
|
resolved_packages_config_ = NULL;
|
|
kernel_buffer_ = NULL;
|
|
kernel_buffer_size_ = 0;
|
|
}
|
|
|
|
IsolateData::IsolateData(IsolateGroupData* isolate_group_data)
|
|
: isolate_group_data_(isolate_group_data),
|
|
loader_(nullptr),
|
|
packages_file_(nullptr) {
|
|
if (isolate_group_data->packages_file_ != nullptr) {
|
|
packages_file_ = Utils::StrDup(isolate_group_data->packages_file_);
|
|
}
|
|
}
|
|
|
|
IsolateData::~IsolateData() {
|
|
free(packages_file_);
|
|
packages_file_ = nullptr;
|
|
}
|
|
|
|
} // namespace bin
|
|
} // namespace dart
|