Skip to content

Commit

Permalink
Remove unused callFunctionReturnResultAndFlushedQueue
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal] Remove unused BatchedBridge.callFunctionReturnResultAndFlushedQueue

Reviewed By: sammy-SC

Differential Revision: D19740946

fbshipit-source-id: 9919d52074180d0fcfb7c0929005f0d925578912
  • Loading branch information
javache authored and facebook-github-bot committed Feb 5, 2020
1 parent 30790be commit 46dcce0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
21 changes: 2 additions & 19 deletions Libraries/BatchedBridge/MessageQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ class MessageQueue {
(this: any).callFunctionReturnFlushedQueue = this.callFunctionReturnFlushedQueue.bind(
this,
);
(this: any).callFunctionReturnResultAndFlushedQueue = this.callFunctionReturnResultAndFlushedQueue.bind(
this,
);
(this: any).flushedQueue = this.flushedQueue.bind(this);
(this: any).invokeCallbackAndReturnFlushedQueue = this.invokeCallbackAndReturnFlushedQueue.bind(
this,
Expand Down Expand Up @@ -115,19 +112,6 @@ class MessageQueue {
return this.flushedQueue();
}

callFunctionReturnResultAndFlushedQueue(
module: string,
method: string,
args: any[],
): $TEMPORARY$array<?[Array<number>, Array<number>, Array<any>, number]> {
let result;
this.__guard(() => {
result = this.__callFunction(module, method, args);
});

return [result, this.flushedQueue()];
}

invokeCallbackAndReturnFlushedQueue(
cbID: number,
args: any[],
Expand Down Expand Up @@ -398,7 +382,7 @@ class MessageQueue {
Systrace.endEvent();
}

__callFunction(module: string, method: string, args: any[]): any {
__callFunction(module: string, method: string, args: any[]): void {
this._lastFlush = Date.now();
this._eventLoopStartTime = this._lastFlush;
if (__DEV__ || this.__spy) {
Expand All @@ -422,9 +406,8 @@ class MessageQueue {
method,
module,
);
const result = moduleMethods[method].apply(moduleMethods, args);
moduleMethods[method].apply(moduleMethods, args);
Systrace.endEvent();
return result;
}

__invokeCallback(cbID: number, args: any[]) {
Expand Down
1 change: 0 additions & 1 deletion RNTester/RNTesterUnitTests/RCTAllocationTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ - (void)setUp
" callFunctionReturnFlushedQueue: function() { return null; },"
" invokeCallbackAndReturnFlushedQueue: function() { return null; },"
" flushedQueue: function() { return null; },"
" callFunctionReturnResultAndFlushedQueue: function() { return null; },"
"};";

NSURL *tempDir = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES];
Expand Down
3 changes: 0 additions & 3 deletions ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,6 @@ void JSIExecutor::bindBridge() {
*runtime_, "invokeCallbackAndReturnFlushedQueue");
flushedQueue_ =
batchedBridge.getPropertyAsFunction(*runtime_, "flushedQueue");
callFunctionReturnResultAndFlushedQueue_ =
batchedBridge.getPropertyAsFunction(
*runtime_, "callFunctionReturnResultAndFlushedQueue");
});
}

Expand Down
1 change: 0 additions & 1 deletion ReactCommon/jsiexecutor/jsireact/JSIExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ class JSIExecutor : public JSExecutor {
folly::Optional<jsi::Function> callFunctionReturnFlushedQueue_;
folly::Optional<jsi::Function> invokeCallbackAndReturnFlushedQueue_;
folly::Optional<jsi::Function> flushedQueue_;
folly::Optional<jsi::Function> callFunctionReturnResultAndFlushedQueue_;
};

using Logger =
Expand Down

0 comments on commit 46dcce0

Please sign in to comment.