changeset 8236:034ae49376a2 8u25-b11

RT-37953: Refreshing page refreshes
author loneid
date Tue, 29 Jul 2014 17:38:46 +0400
parents 741607023e18
children 468e5952eb57
files modules/web/src/main/native/Source/WebCore/platform/java/BridgeUtils.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/web/src/main/native/Source/WebCore/platform/java/BridgeUtils.cpp	Thu Jul 31 15:48:30 2014 -0700
+++ b/modules/web/src/main/native/Source/WebCore/platform/java/BridgeUtils.cpp	Tue Jul 29 17:38:46 2014 +0400
@@ -403,6 +403,10 @@
     JSObjectRef object;
     JSContextRef ctx;
     RefPtr<JSC::Bindings::RootObject> rootObject(checkJSPeer(peer, peer_type, object, ctx));
+    if (!rootObject || !ctx) {
+        env->ThrowNew(getJSExceptionClass(env), "Invalid function reference");
+        return NULL;
+    }
 
     JSStringRef name = WebCore::asJSStringRef(env, methodName);
     JSValueRef member = JSObjectGetProperty(ctx, object, name, NULL);