Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1150,18 +1150,6 @@ FILE: ../../../flutter/third_party/tonic/dart_state.h
FILE: ../../../flutter/third_party/tonic/dart_wrappable.cc
FILE: ../../../flutter/third_party/tonic/dart_wrappable.h
FILE: ../../../flutter/third_party/tonic/dart_wrapper_info.h
FILE: ../../../flutter/third_party/tonic/file_loader/file_loader.cc
FILE: ../../../flutter/third_party/tonic/file_loader/file_loader.h
FILE: ../../../flutter/third_party/tonic/file_loader/file_loader_fuchsia.cc
FILE: ../../../flutter/third_party/tonic/file_loader/file_loader_posix.cc
FILE: ../../../flutter/third_party/tonic/file_loader/file_loader_win.cc
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/eintr_wrapper.h
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/file.cc
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/file.h
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/path.h
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/path_posix.cc
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/path_win.cc
FILE: ../../../flutter/third_party/tonic/filesystem/filesystem/portable_unistd.h
FILE: ../../../flutter/third_party/tonic/logging/dart_error.cc
FILE: ../../../flutter/third_party/tonic/logging/dart_error.h
FILE: ../../../flutter/third_party/tonic/logging/dart_invoke.cc
Expand Down
1 change: 0 additions & 1 deletion runtime/dart_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "third_party/tonic/dart_class_provider.h"
#include "third_party/tonic/dart_message_handler.h"
#include "third_party/tonic/dart_state.h"
#include "third_party/tonic/file_loader/file_loader.h"
#include "third_party/tonic/logging/dart_invoke.h"
#include "third_party/tonic/scopes/dart_api_scope.h"
#include "third_party/tonic/scopes/dart_isolate_scope.h"
Expand Down
1 change: 0 additions & 1 deletion runtime/dart_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "third_party/tonic/converter/dart_converter.h"
#include "third_party/tonic/dart_class_library.h"
#include "third_party/tonic/dart_class_provider.h"
#include "third_party/tonic/file_loader/file_loader.h"
#include "third_party/tonic/logging/dart_error.h"
#include "third_party/tonic/scopes/dart_api_scope.h"
#include "third_party/tonic/typed_data/typed_list.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,9 @@ bool DartComponentController::CreateIsolate(
// Create the isolate from the snapshot.
char* error = nullptr;

// TODO(dart_runner): Pass if we start using tonic's loader.
intptr_t namespace_fd = -1;
// Freed in IsolateShutdownCallback.
auto state = new std::shared_ptr<tonic::DartState>(new tonic::DartState(
namespace_fd, [this](Dart_Handle result) { MessageEpilogue(result); }));
[this](Dart_Handle result) { MessageEpilogue(result); }));

isolate_ = Dart_CreateIsolateGroup(
url_.c_str(), label_.c_str(), isolate_snapshot_data,
Expand Down
1 change: 0 additions & 1 deletion third_party/tonic/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ source_set("tonic") {
public_deps = [
"common",
"converter",
"file_loader",
"logging",
"scopes",
"typed_data",
Expand Down
11 changes: 1 addition & 10 deletions third_party/tonic/dart_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "tonic/converter/dart_converter.h"
#include "tonic/dart_class_library.h"
#include "tonic/dart_message_handler.h"
#include "tonic/file_loader/file_loader.h"

namespace tonic {

Expand All @@ -19,12 +18,10 @@ DartState::Scope::Scope(std::shared_ptr<DartState> dart_state)

DartState::Scope::~Scope() {}

DartState::DartState(int dirfd,
std::function<void(Dart_Handle)> message_epilogue)
DartState::DartState(std::function<void(Dart_Handle)> message_epilogue)
: isolate_(nullptr),
class_library_(new DartClassLibrary),
message_handler_(new DartMessageHandler()),
file_loader_(new FileLoader(dirfd)),
message_epilogue_(message_epilogue),
has_set_return_code_(false) {}

Expand Down Expand Up @@ -66,10 +63,4 @@ void DartState::SetReturnCodeCallback(std::function<void(uint32_t)> callback) {

void DartState::DidSetIsolate() {}

Dart_Handle DartState::HandleLibraryTag(Dart_LibraryTag tag,
Dart_Handle library,
Dart_Handle url) {
return Current()->file_loader().HandleLibraryTag(tag, library, url);
}

} // namespace tonic
5 changes: 1 addition & 4 deletions third_party/tonic/dart_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class DartState : public std::enable_shared_from_this<DartState> {
DartApiScope api_scope_;
};

DartState(int dirfd = -1,
std::function<void(Dart_Handle)> message_epilogue = nullptr);
DartState(std::function<void(Dart_Handle)> message_epilogue = nullptr);
virtual ~DartState();

static DartState* From(Dart_Isolate isolate);
Expand All @@ -51,7 +50,6 @@ class DartState : public std::enable_shared_from_this<DartState> {

DartClassLibrary& class_library() { return *class_library_; }
DartMessageHandler& message_handler() { return *message_handler_; }
FileLoader& file_loader() { return *file_loader_; }

void MessageEpilogue(Dart_Handle message_result) {
if (message_epilogue_) {
Expand All @@ -72,7 +70,6 @@ class DartState : public std::enable_shared_from_this<DartState> {
Dart_Isolate isolate_;
std::unique_ptr<DartClassLibrary> class_library_;
std::unique_ptr<DartMessageHandler> message_handler_;
std::unique_ptr<FileLoader> file_loader_;
std::function<void(Dart_Handle)> message_epilogue_;
std::function<void(uint32_t)> set_return_code_callback_;
bool has_set_return_code_;
Expand Down
30 changes: 0 additions & 30 deletions third_party/tonic/file_loader/BUILD.gn

This file was deleted.

239 changes: 0 additions & 239 deletions third_party/tonic/file_loader/file_loader.cc

This file was deleted.

Loading