Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit e7afac9

Browse files
committed
Use temp void*
1 parent 4bb0274 commit e7afac9

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

runtime/dart_deferred_load_handler.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
#include "flutter/runtime/dart_deferred_load_handler.h"
66

7+
#include "flutter/runtime/runtime_controller.h"
8+
79
namespace flutter {
810

9-
RuntimeController* DartDeferredLoadHandler::runtime_controller_ = nullptr;
11+
void* DartDeferredLoadHandler::runtime_controller_ = nullptr;
1012

1113
Dart_DeferredLoadHandler
1214
DartDeferredLoadHandler::empty_dart_deferred_load_handler =
@@ -16,14 +18,15 @@ Dart_DeferredLoadHandler DartDeferredLoadHandler::dart_deferred_load_handler =
1618
&DartDeferredLoadHandler::OnDartLoadLibrary;
1719

1820
void DartDeferredLoadHandler::RegisterRuntimeController(
19-
RuntimeController* runtime_controller) {
21+
void* runtime_controller) {
2022
runtime_controller_ = runtime_controller;
2123
}
2224

2325
Dart_Handle DartDeferredLoadHandler::OnDartLoadLibrary(
2426
intptr_t loading_unit_id) {
2527
if (runtime_controller_ != nullptr)
26-
return runtime_controller_->OnDartLoadLibrary(loading_unit_id);
28+
return static_cast<RuntimeController*>(runtime_controller_)
29+
->OnDartLoadLibrary(loading_unit_id);
2730
return Dart_Null();
2831
}
2932

runtime/dart_deferred_load_handler.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
#ifndef FLUTTER_RUNTIME_DART_DEFERRED_LOAD_HANDLER_H_
66
#define FLUTTER_RUNTIME_DART_DEFERRED_LOAD_HANDLER_H_
77

8-
// #include <memory>
8+
#include <memory>
99
#include <string>
1010

11-
#include "flutter/runtime/runtime_controller.h"
1211
#include "third_party/dart/runtime/include/dart_api.h"
1312

1413
namespace flutter {
1514

1615
class DartDeferredLoadHandler {
1716
public:
18-
static void RegisterRuntimeController(RuntimeController* runtime_controller);
17+
// TODO: Fix deps to not use void*
18+
static void RegisterRuntimeController(void* runtime_controller);
1919

2020
static Dart_DeferredLoadHandler empty_dart_deferred_load_handler;
2121
static Dart_DeferredLoadHandler dart_deferred_load_handler;
@@ -25,7 +25,7 @@ class DartDeferredLoadHandler {
2525
// No-op function that returns Dart_Null() for when the isolate is not
2626
// expected to handle deferred libraries.
2727
static Dart_Handle EmptyDartLoadLibrary(intptr_t loading_unit_id);
28-
static RuntimeController* runtime_controller_;
28+
static void* runtime_controller_;
2929
};
3030

3131
} // namespace flutter

0 commit comments

Comments
 (0)