Reland: [fuchsia] Enable running from source packages (flutter/engine#4634)
This relands https://github.com/flutter/engine/pull/4629 with a tonic roll to fix the build.
This commit is contained in:
2
DEPS
2
DEPS
@@ -127,7 +127,7 @@ deps = {
|
||||
Var('fuchsia_git') + '/garnet' + '@' + 'b3ba6b6d6ab8ef658278cc43c9f839a8a8d1718e',
|
||||
|
||||
'src/topaz':
|
||||
Var('fuchsia_git') + '/topaz' + '@' + '1eb2e77be92ed968223b0cea19fe2108e689dcd5',
|
||||
Var('fuchsia_git') + '/topaz' + '@' + '201335048e32db217493141a3ab61137aea60d78',
|
||||
|
||||
'src/third_party/benchmark':
|
||||
Var('fuchsia_git') + '/third_party/benchmark' + '@' + '296537bc48d380adf21567c5d736ab79f5363d22',
|
||||
|
||||
@@ -15,8 +15,10 @@ namespace blink {
|
||||
IsolateClient::~IsolateClient() {}
|
||||
|
||||
UIDartState::UIDartState(IsolateClient* isolate_client,
|
||||
std::unique_ptr<Window> window)
|
||||
: isolate_client_(isolate_client),
|
||||
std::unique_ptr<Window> window,
|
||||
int dirfd)
|
||||
: tonic::DartState(dirfd),
|
||||
isolate_client_(isolate_client),
|
||||
main_port_(ILLEGAL_PORT),
|
||||
window_(std::move(window)) {}
|
||||
|
||||
|
||||
@@ -28,7 +28,9 @@ class IsolateClient {
|
||||
|
||||
class UIDartState : public tonic::DartState {
|
||||
public:
|
||||
UIDartState(IsolateClient* isolate_client, std::unique_ptr<Window> window);
|
||||
UIDartState(IsolateClient* isolate_client,
|
||||
std::unique_ptr<Window> window,
|
||||
int dirfd = -1);
|
||||
~UIDartState() override;
|
||||
|
||||
static UIDartState* Current();
|
||||
|
||||
@@ -29,13 +29,15 @@ RuntimeController::~RuntimeController() {}
|
||||
void RuntimeController::CreateDartController(
|
||||
const std::string& script_uri,
|
||||
const uint8_t* isolate_snapshot_data,
|
||||
const uint8_t* isolate_snapshot_instr) {
|
||||
const uint8_t* isolate_snapshot_instr,
|
||||
int dirfd) {
|
||||
FXL_DCHECK(!dart_controller_);
|
||||
|
||||
dart_controller_.reset(new DartController());
|
||||
dart_controller_->CreateIsolateFor(
|
||||
script_uri, isolate_snapshot_data, isolate_snapshot_instr,
|
||||
std::make_unique<UIDartState>(this, std::make_unique<Window>(this)));
|
||||
std::make_unique<UIDartState>(this, std::make_unique<Window>(this),
|
||||
dirfd));
|
||||
|
||||
UIDartState* dart_state = dart_controller_->dart_state();
|
||||
DartState::Scope scope(dart_state);
|
||||
|
||||
@@ -28,7 +28,8 @@ class RuntimeController : public WindowClient, public IsolateClient {
|
||||
|
||||
void CreateDartController(const std::string& script_uri,
|
||||
const uint8_t* isolate_snapshot_data,
|
||||
const uint8_t* isolate_snapshot_instr);
|
||||
const uint8_t* isolate_snapshot_instr,
|
||||
int dirfd = -1);
|
||||
DartController* dart_controller() const { return dart_controller_.get(); }
|
||||
|
||||
void SetViewportMetrics(const ViewportMetrics& metrics);
|
||||
|
||||
Reference in New Issue
Block a user