Closed Bug 1709394 Opened 3 years ago Closed 3 years ago

Don't use chunked data to set current editable text in GeckoEditableChild.onTextChange

Categories

(GeckoView :: General, defect, P1)

Unspecified
All

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

Details

(Whiteboard: [geckoview:m90])

Crash Data

Attachments

(1 file)

Actually, when we set java side text from Gecko for InputConnection and GeckoEditable, we use the following binder call.

https://searchfox.org/mozilla-central/rev/185ab5e4f4e01341e009cd4633d1275ffe4d4c8b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEditableChild.java#285

    @WrapForJNI(calledFrom = "gecko", exceptionMode = "ignore")
    private void onTextChange(final CharSequence text, final int start,
                              final int unboundedOldEnd, final int unboundedNewEnd)
            throws RemoteException {
...
        mEditableParent.onTextChange(mEditableChild.asBinder(), text, start, unboundedOldEnd);

But if text is large such as 500KB, this causes binder's exception due to large data, then we cannot set valid text data to GeckoEditable. So we should use small splitted text data instead of chunked data.

GeckoView beta/release channel don't crash by this exception. Nightly will crash due to diagnostics.

Crash Signature: [@ android.os.TransactionTooLargeException: at android.os.BinderProxy.transactNative(Native Method)]
Severity: -- → S2
Priority: -- → P1
Whiteboard: [geckoview:m90]

When taking focus on <input> element that has large text such as 1MB, we
cannot pass current text to InputConnection.

Since we use binder call to set initial text to InputConnection, large text
causes TransactionTooLargeException exception. So we use small chunked data
(64K length) instead.

Attachment #9221049 - Attachment description: Bug 1709394 - Use split text data on binder call. r=#geckoview-reviewers → Bug 1709394 - Use split text data on binder call.
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/31b84dda900f
Use split text data on binder call. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: