Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1426)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java

Issue 986553004: Hold messages in message port service when a message port is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address hush nit Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/MessagePort.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java b/android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java
index 4229cf5d576c94279ec72a026a900eab81885787..626d427473197bddf14472a170c098cfdbcc7817 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java
@@ -115,6 +115,12 @@ public class AwMessagePortService {
return new MessagePort[]{new MessagePort(this), new MessagePort(this)};
}
+ // Called on UI thread.
+ public void releaseMessages(int portId) {
+ if (mNativeMessagePortService == 0) return;
+ nativeReleaseMessages(mNativeMessagePortService, portId);
+ }
+
private MessagePort addPort(MessagePort m, int portId) {
if (mPortStorage.get(portId) != null) {
throw new IllegalStateException("Port already exists");
@@ -152,4 +158,6 @@ public class AwMessagePortService {
int senderId, String message, int[] portIds);
private native void nativeClosePort(long nativeAwMessagePortServiceImpl,
int messagePortId);
+ private native void nativeReleaseMessages(long nativeAwMessagePortServiceImpl,
+ int messagePortId);
}
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/MessagePort.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698