Skip to content

Commit

Permalink
[Messages] Fix NPE on Mediator#resumeQueue
Browse files Browse the repository at this point in the history
Reorder the initializaton of dispather and mediator so that
mediator can receive a correctly initialized dispatcher

Bug: 1144644
Change-Id: I8bc63b2444c32a4e9e8f3459a4a3ea15fe506ca8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2514772
Auto-Submit: Lijin Shen <lazzzis@google.com>
Reviewed-by: Theresa  <twellington@chromium.org>
Commit-Queue: Theresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823321}
  • Loading branch information
Lijin Shen authored and Commit Bot committed Nov 2, 2020
1 parent 9bcd069 commit 307461c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ public void onFinishNativeInitialization() {
MessageContainer container = mActivity.findViewById(R.id.message_container);
mMessageContainerCoordinator =
new MessageContainerCoordinator(container, getBrowserControlsManager());
mMessageDispatcher = MessagesFactory.createMessageDispatcher(container);
mMessageQueueMediator = new ChromeMessageQueueMediator(
mActivity.getBrowserControlsManager(), mMessageContainerCoordinator,
mActivity.getFullscreenManager(), mMessageDispatcher);
mMessageDispatcher = MessagesFactory.createMessageDispatcher(container);
mMessageDispatcher.setDelegate(mMessageQueueMediator);
MessagesFactory.attachMessageDispatcher(
mActivity.getWindowAndroid(), mMessageDispatcher);
Expand Down

0 comments on commit 307461c

Please sign in to comment.