summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/V8Utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/V8Utilities.cpp')
-rw-r--r--WebCore/bindings/v8/V8Utilities.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/WebCore/bindings/v8/V8Utilities.cpp b/WebCore/bindings/v8/V8Utilities.cpp
index 395a8df..c1ac6d4 100644
--- a/WebCore/bindings/v8/V8Utilities.cpp
+++ b/WebCore/bindings/v8/V8Utilities.cpp
@@ -58,7 +58,8 @@ void createHiddenDependency(v8::Local<v8::Object> object, v8::Local<v8::Value> v
void removeHiddenDependency(v8::Local<v8::Object> object, v8::Local<v8::Value> value, int cacheIndex)
{
v8::Local<v8::Value> cache = object->GetInternalField(cacheIndex);
- ASSERT(cache->IsArray());
+ if (!cache->IsArray())
+ return;
v8::Local<v8::Array> cacheArray = v8::Local<v8::Array>::Cast(cache);
for (int i = cacheArray->Length() - 1; i >= 0; --i) {
v8::Local<v8::Value> cached = cacheArray->Get(v8::Integer::New(i));
@@ -67,9 +68,6 @@ void removeHiddenDependency(v8::Local<v8::Object> object, v8::Local<v8::Value> v
return;
}
}
-
- // We should only get here if we try to remove an event listener that was never added.
- ASSERT_NOT_REACHED();
}
bool processingUserGesture()