From 49dccc8c4448cfeec444b5801690e5a6c1069b2e Mon Sep 17 00:00:00 2001 From: Feng Qian Date: Tue, 14 Jul 2009 13:20:05 -0700 Subject: [PATCH] Pick up a bug fix from Chromium. The same fix is upstreamed to WebKit. --- WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp b/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp index b0789e59f..2ed1638ea 100644 --- a/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp +++ b/WebCore/bindings/v8/custom/V8DOMApplicationCacheCustom.cpp @@ -79,8 +79,10 @@ ACCESSOR_GETTER(DOMApplicationCacheEventHandler) { INC_STATS("DOMApplicationCache.onevent_getter"); DOMApplicationCache* appcache = V8Proxy::ToNativeObject(V8ClassIndex::DOMAPPLICATIONCACHE, info.Holder()); - EventListener* listener = appcache->getAttributeEventListener(toEventType(name)); - return eventListenerToV8Object(listener); + if (EventListener* listener = appcache->getAttributeEventListener(toEventType(name))) { + return eventListenerToV8Object(listener); + } + return v8::Null(); } // Handles appcache.onfooevent attribute setting -- 2.11.0