Commit 6d606586 authored by ajith.v@samsung.com's avatar ajith.v@samsung.com

Safety check has been added before calling native JNI functions to prevent random crashes.

BUG=

Review URL: https://codereview.chromium.org/269443003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268016 0039d316-1c4b-4281-b951-d872f2087c98
parent a7fcf40a
......@@ -16,6 +16,7 @@ Adam Treat <adam.treat@samsung.com>
Adenilson Cavalcanti <a.cavalcanti@partner.samsung.com>
Aditya Bhargava <heuristicist@gmail.com>
Ajay Berwal <ajay.berwal@samsung.com>
Ajith Kumar V <ajith.v@samsung.com>
Alex Gartrell <agartrell@cmu.edu>
Alex Scheele <alexscheele@gmail.com>
Alexander Sulfrian <alexander@sulfrian.net>
......
......@@ -1468,8 +1468,10 @@ public class ContentViewCore
TraceEvent.begin();
if (newConfig.keyboard != Configuration.KEYBOARD_NOKEYS) {
mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore),
ImeAdapter.getTextInputTypeNone());
if (mNativeContentViewCore != 0) {
mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore),
ImeAdapter.getTextInputTypeNone());
}
mInputMethodManagerWrapper.restartInput(mContainerView);
}
mContainerViewInternals.super_onConfigurationChanged(newConfig);
......@@ -1655,6 +1657,8 @@ public class ContentViewCore
if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
switch (event.getAction()) {
case MotionEvent.ACTION_SCROLL:
if (mNativeContentViewCore == 0) return false;
nativeSendMouseWheelEvent(mNativeContentViewCore, event.getEventTime(),
event.getX(), event.getY(),
event.getAxisValue(MotionEvent.AXIS_VSCROLL));
......@@ -2131,7 +2135,7 @@ public class ContentViewCore
}
public void clearSslPreferences() {
nativeClearSslPreferences(mNativeContentViewCore);
if (mNativeContentViewCore != 0) nativeClearSslPreferences(mNativeContentViewCore);
}
private boolean isSelectionHandleShowing() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment