mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:29:47 +00:00
a212b75ba7
Should fix issues with Windows path resolution and a potential invalid free.
This reverts commit 6053084920
.
Change-Id: I683abdbf2c10644e6cadd9643ea880cee9338f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138014
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
33 lines
962 B
C++
33 lines
962 B
C++
// Copyright (c) 2020, 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.
|
|
|
|
#ifndef RUNTIME_BIN_DARTDEV_UTILS_H_
|
|
#define RUNTIME_BIN_DARTDEV_UTILS_H_
|
|
|
|
#include "platform/globals.h"
|
|
|
|
namespace dart {
|
|
namespace bin {
|
|
|
|
class DartDevUtils {
|
|
public:
|
|
// Returns true if there does not exist a file at |script_uri| or the URI is
|
|
// not an HTTP resource.
|
|
static bool ShouldParseCommand(const char* script_uri);
|
|
|
|
// Returns true if we were successfully able to find the DartDev snapshot.
|
|
// Returns false if we were unable to find the snapshot, in which case the
|
|
// VM should exit.
|
|
static bool TryResolveDartDevSnapshotPath(char** script_name);
|
|
|
|
private:
|
|
DISALLOW_ALLOCATION();
|
|
DISALLOW_IMPLICIT_CONSTRUCTORS(DartDevUtils);
|
|
};
|
|
|
|
} // namespace bin
|
|
} // namespace dart
|
|
|
|
#endif // RUNTIME_BIN_DARTDEV_UTILS_H_
|