Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9fa8be5 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Prevent serialization after being destroyed"

parents b71fe052 90afe21d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -36,11 +36,15 @@ class ViewStateSerializer {

    static boolean serializeViewState(OutputStream stream, WebView web)
            throws IOException {
        int baseLayer = web.getBaseLayer();
        if (baseLayer == 0) {
            return false;
        }
        DataOutputStream dos = new DataOutputStream(stream);
        dos.writeInt(VERSION);
        dos.writeInt(web.getContentWidth());
        dos.writeInt(web.getContentHeight());
        return nativeSerializeViewState(web.getBaseLayer(), dos,
        return nativeSerializeViewState(baseLayer, dos,
                new byte[WORKING_STREAM_STORAGE]);
    }

+3 −0
Original line number Diff line number Diff line
@@ -4308,6 +4308,9 @@ public class WebView extends AbsoluteLayout
    }

    int getBaseLayer() {
        if (mNativeClass == 0) {
            return 0;
        }
        return nativeGetBaseLayer();
    }