a294e0a82f
Retain script path of parent isolate when spawnFunction is called so that it works when using script snapshots. The test case issue14236_test.dart is a script snapshot whose original source file path is issue14236_source.dart R=iposva@google.com, sgjesse@google.com Review URL: https://codereview.chromium.org//35393003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29178 260f80e4-7a28-3924-810f-c04153c831b5
39 lines
873 B
C++
39 lines
873 B
C++
// Copyright (c) 2012, 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 BIN_ISOLATE_DATA_H_
|
|
#define BIN_ISOLATE_DATA_H_
|
|
|
|
#include "include/dart_api.h"
|
|
#include "platform/globals.h"
|
|
|
|
|
|
namespace dart {
|
|
namespace bin {
|
|
|
|
// Forward declaration.
|
|
class EventHandler;
|
|
|
|
// Data associated with every isolate in the standalone VM
|
|
// embedding. This is used to free external resources for each isolate
|
|
// when the isolate shuts down.
|
|
class IsolateData {
|
|
public:
|
|
explicit IsolateData(const char* url) : script_url(strdup(url)) {
|
|
}
|
|
~IsolateData() {
|
|
free(script_url);
|
|
}
|
|
|
|
char* script_url;
|
|
|
|
private:
|
|
DISALLOW_COPY_AND_ASSIGN(IsolateData);
|
|
};
|
|
|
|
} // namespace bin
|
|
} // namespace dart
|
|
|
|
#endif // BIN_ISOLATE_DATA_H_
|