Skip to content

Commit 46dcce0

Browse files
javachefacebook-github-bot
authored andcommitted
Remove unused callFunctionReturnResultAndFlushedQueue
Summary: Changelog: [Internal] Remove unused BatchedBridge.callFunctionReturnResultAndFlushedQueue Reviewed By: sammy-SC Differential Revision: D19740946 fbshipit-source-id: 9919d52074180d0fcfb7c0929005f0d925578912
1 parent 30790be commit 46dcce0

File tree

4 files changed

+2
-24
lines changed

4 files changed

+2
-24
lines changed

Libraries/BatchedBridge/MessageQueue.js

+2-19
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ class MessageQueue {
7474
(this: any).callFunctionReturnFlushedQueue = this.callFunctionReturnFlushedQueue.bind(
7575
this,
7676
);
77-
(this: any).callFunctionReturnResultAndFlushedQueue = this.callFunctionReturnResultAndFlushedQueue.bind(
78-
this,
79-
);
8077
(this: any).flushedQueue = this.flushedQueue.bind(this);
8178
(this: any).invokeCallbackAndReturnFlushedQueue = this.invokeCallbackAndReturnFlushedQueue.bind(
8279
this,
@@ -115,19 +112,6 @@ class MessageQueue {
115112
return this.flushedQueue();
116113
}
117114

118-
callFunctionReturnResultAndFlushedQueue(
119-
module: string,
120-
method: string,
121-
args: any[],
122-
): $TEMPORARY$array<?[Array<number>, Array<number>, Array<any>, number]> {
123-
let result;
124-
this.__guard(() => {
125-
result = this.__callFunction(module, method, args);
126-
});
127-
128-
return [result, this.flushedQueue()];
129-
}
130-
131115
invokeCallbackAndReturnFlushedQueue(
132116
cbID: number,
133117
args: any[],
@@ -398,7 +382,7 @@ class MessageQueue {
398382
Systrace.endEvent();
399383
}
400384

401-
__callFunction(module: string, method: string, args: any[]): any {
385+
__callFunction(module: string, method: string, args: any[]): void {
402386
this._lastFlush = Date.now();
403387
this._eventLoopStartTime = this._lastFlush;
404388
if (__DEV__ || this.__spy) {
@@ -422,9 +406,8 @@ class MessageQueue {
422406
method,
423407
module,
424408
);
425-
const result = moduleMethods[method].apply(moduleMethods, args);
409+
moduleMethods[method].apply(moduleMethods, args);
426410
Systrace.endEvent();
427-
return result;
428411
}
429412

430413
__invokeCallback(cbID: number, args: any[]) {

RNTester/RNTesterUnitTests/RCTAllocationTests.m

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ - (void)setUp
6060
" callFunctionReturnFlushedQueue: function() { return null; },"
6161
" invokeCallbackAndReturnFlushedQueue: function() { return null; },"
6262
" flushedQueue: function() { return null; },"
63-
" callFunctionReturnResultAndFlushedQueue: function() { return null; },"
6463
"};";
6564

6665
NSURL *tempDir = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES];

ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ void JSIExecutor::bindBridge() {
290290
*runtime_, "invokeCallbackAndReturnFlushedQueue");
291291
flushedQueue_ =
292292
batchedBridge.getPropertyAsFunction(*runtime_, "flushedQueue");
293-
callFunctionReturnResultAndFlushedQueue_ =
294-
batchedBridge.getPropertyAsFunction(
295-
*runtime_, "callFunctionReturnResultAndFlushedQueue");
296293
});
297294
}
298295

ReactCommon/jsiexecutor/jsireact/JSIExecutor.h

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ class JSIExecutor : public JSExecutor {
129129
folly::Optional<jsi::Function> callFunctionReturnFlushedQueue_;
130130
folly::Optional<jsi::Function> invokeCallbackAndReturnFlushedQueue_;
131131
folly::Optional<jsi::Function> flushedQueue_;
132-
folly::Optional<jsi::Function> callFunctionReturnResultAndFlushedQueue_;
133132
};
134133

135134
using Logger =

0 commit comments

Comments
 (0)