summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-09-15 11:01:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-15 11:01:09 -0700
commite58b3f68036f1c961ed4c2c65a547481d8fde3e3 (patch)
tree7c69714d660b68213f81d05ca306fb499e9bfdaa /Source
parent4c939b9e9f84df00ee65eb7aaffacbf88b60def8 (diff)
parentdd888d7ab78958132c660a402edcc490bf690620 (diff)
downloadexternal_webkit-e58b3f68036f1c961ed4c2c65a547481d8fde3e3.zip
external_webkit-e58b3f68036f1c961ed4c2c65a547481d8fde3e3.tar.gz
external_webkit-e58b3f68036f1c961ed4c2c65a547481d8fde3e3.tar.bz2
Merge "Fix Monkey crash in V8AbstractEventListener"
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/bindings/v8/V8AbstractEventListener.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp b/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp
index 90dc097..0de99f8 100644
--- a/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp
+++ b/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp
@@ -72,6 +72,14 @@ V8AbstractEventListener::~V8AbstractEventListener()
void V8AbstractEventListener::handleEvent(ScriptExecutionContext* context, Event* event)
{
+#ifdef ANDROID
+ // Monkey data shows that we can crash here, due to script executing while the
+ // page's frame has been detached (in the middle of a navigation).
+ // See b/5201341
+ if (!context)
+ return;
+#endif
+
// Don't reenter V8 if execution was terminated in this instance of V8.
if (context->isJSExecutionForbidden())
return;