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

Commit 93eeb48

Browse files
authored
Revert "Revert "Remove unnecessary entry-point closurization. (#7827)" (#7876)" (#7904)
This reverts commit f45572e.
1 parent bbaeba3 commit 93eeb48

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

lib/stub_ui/natives.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Future<developer.ServiceExtensionResponse> _scheduleFrame(
2020
}));
2121
}
2222

23-
@pragma('vm:entry-point')
23+
@pragma('vm:entry-point', 'call')
2424
void _setupHooks() { // ignore: unused_element
2525
assert(() {
2626
// In debug mode, register the schedule frame extension.

lib/ui/hooks.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dynamic _decodeJSON(String message) {
1616
return message != null ? json.decode(message) : null;
1717
}
1818

19-
@pragma('vm:entry-point')
19+
@pragma('vm:entry-point', 'call')
2020
// ignore: unused_element
2121
void _updateWindowMetrics(double devicePixelRatio,
2222
double width,
@@ -54,11 +54,11 @@ String _localeClosure() {
5454
return window.locale.toString();
5555
}
5656

57-
@pragma('vm:entry-point')
57+
@pragma('vm:entry-point', 'call')
5858
// ignore: unused_element
5959
_LocaleClosure _getLocaleClosure() => _localeClosure;
6060

61-
@pragma('vm:entry-point')
61+
@pragma('vm:entry-point', 'call')
6262
// ignore: unused_element
6363
void _updateLocales(List<String> locales) {
6464
const int stringsPerLocale = 4;
@@ -77,7 +77,7 @@ void _updateLocales(List<String> locales) {
7777
_invoke(window.onLocaleChanged, window._onLocaleChangedZone);
7878
}
7979

80-
@pragma('vm:entry-point')
80+
@pragma('vm:entry-point', 'call')
8181
// ignore: unused_element
8282
void _updateUserSettingsData(String jsonData) {
8383
final Map<String, dynamic> data = json.decode(jsonData);
@@ -103,14 +103,14 @@ void _updatePlatformBrightness(String brightnessName) {
103103
_invoke(window.onPlatformBrightnessChanged, window._onPlatformBrightnessChangedZone);
104104
}
105105

106-
@pragma('vm:entry-point')
106+
@pragma('vm:entry-point', 'call')
107107
// ignore: unused_element
108108
void _updateSemanticsEnabled(bool enabled) {
109109
window._semanticsEnabled = enabled;
110110
_invoke(window.onSemanticsEnabledChanged, window._onSemanticsEnabledChangedZone);
111111
}
112112

113-
@pragma('vm:entry-point')
113+
@pragma('vm:entry-point', 'call')
114114
// ignore: unused_element
115115
void _updateAccessibilityFeatures(int values) {
116116
final AccessibilityFeatures newFeatures = new AccessibilityFeatures._(values);
@@ -120,7 +120,7 @@ void _updateAccessibilityFeatures(int values) {
120120
_invoke(window.onAccessibilityFeaturesChanged, window._onAccessibilityFlagsChangedZone);
121121
}
122122

123-
@pragma('vm:entry-point')
123+
@pragma('vm:entry-point', 'call')
124124
void _dispatchPlatformMessage(String name, ByteData data, int responseId) {
125125
if (window.onPlatformMessage != null) {
126126
_invoke3<String, ByteData, PlatformMessageResponseCallback>(
@@ -137,14 +137,14 @@ void _dispatchPlatformMessage(String name, ByteData data, int responseId) {
137137
}
138138
}
139139

140-
@pragma('vm:entry-point')
140+
@pragma('vm:entry-point', 'call')
141141
// ignore: unused_element
142142
void _dispatchPointerDataPacket(ByteData packet) {
143143
if (window.onPointerDataPacket != null)
144144
_invoke1<PointerDataPacket>(window.onPointerDataPacket, window._onPointerDataPacketZone, _unpackPointerDataPacket(packet));
145145
}
146146

147-
@pragma('vm:entry-point')
147+
@pragma('vm:entry-point', 'call')
148148
// ignore: unused_element
149149
void _dispatchSemanticsAction(int id, int action, ByteData args) {
150150
_invoke3<int, SemanticsAction, ByteData>(
@@ -156,13 +156,13 @@ void _dispatchSemanticsAction(int id, int action, ByteData args) {
156156
);
157157
}
158158

159-
@pragma('vm:entry-point')
159+
@pragma('vm:entry-point', 'call')
160160
// ignore: unused_element
161161
void _beginFrame(int microseconds) {
162162
_invoke1<Duration>(window.onBeginFrame, window._onBeginFrameZone, new Duration(microseconds: microseconds));
163163
}
164164

165-
@pragma('vm:entry-point')
165+
@pragma('vm:entry-point', 'call')
166166
// ignore: unused_element
167167
void _drawFrame() {
168168
_invoke(window.onDrawFrame, window._onDrawFrameZone);
@@ -173,7 +173,7 @@ typedef _UnaryFunction(Null args);
173173
// ignore: always_declare_return_types, prefer_generic_function_type_aliases
174174
typedef _BinaryFunction(Null args, Null message);
175175

176-
@pragma('vm:entry-point')
176+
@pragma('vm:entry-point', 'call')
177177
// ignore: unused_element
178178
void _runMainZoned(Function startMainIsolateFunction, Function userMainFunction) {
179179
startMainIsolateFunction((){

lib/ui/natives.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Future<developer.ServiceExtensionResponse> _scheduleFrame(
2929
}));
3030
}
3131

32-
@pragma('vm:entry-point')
32+
@pragma('vm:entry-point', 'call')
3333
void _setupHooks() { // ignore: unused_element
3434
assert(() {
3535
// In debug mode, register the schedule frame extension.
@@ -71,7 +71,7 @@ Function _getCallbackFromHandle(int handle) native 'GetCallbackFromHandle';
7171
// Required for gen_snapshot to work correctly.
7272
int _isolateId; // ignore: unused_element
7373

74-
@pragma('vm:entry-point')
74+
@pragma('vm:entry-point', 'call')
7575
Function _getPrintClosure() => _print; // ignore: unused_element
76-
@pragma('vm:entry-point')
76+
@pragma('vm:entry-point', 'call')
7777
Function _getScheduleMicrotaskClosure() => _scheduleMicrotask; // ignore: unused_element

0 commit comments

Comments
 (0)