[webkit-changes] [51133] trunk/WebCore

Yong Li yong.li.webkit at gmail.com
Mon Nov 30 09:08:58 PST 2009


+    m_notifierToIdMap.set(notifier.release(), id);

Is it a leak? notifier.release() leaves 1 extra reference on the object, and
so the object will never be released I guess.

-Yong

2009/11/18 <weinig at apple.com>

>   Revision 51133 <http://trac.webkit.org/projects/webkit/changeset/51133>
> Author weinig at apple.com Date 2009-11-18 14:04:29 -0800 (Wed, 18 Nov 2009) Log
> Message
>
> Fix two Geolocation assertions.
>
> Reviewed by Anders Carlsson.
>
> * page/Chrome.cpp:
> (WebCore::Chrome::requestGeolocationPermissionForFrame): No need to use PageGroupLoadDeferrer since this
> is not called from JS.
> * page/Geolocation.cpp:
> (WebCore::Geolocation::Watchers::set): The PassRefPtr was getting nulled out, so we need to put it in
> a RefPtr first.
>
> Modified Paths
>
>    - trunk/WebCore/ChangeLog<http://mail.google.com/mail/?ui=2&view=js&name=js&ver=AQ_JYcbp6cc.zh_CN.&am=!Iec9iPCj39i5BXHC0fIvctR3RWRZaCMTTB56FXx8JpWnzQ#125095356c17cb8d_trunkWebCoreChangeLog>
>    - trunk/WebCore/page/Chrome.cpp<http://mail.google.com/mail/?ui=2&view=js&name=js&ver=AQ_JYcbp6cc.zh_CN.&am=!Iec9iPCj39i5BXHC0fIvctR3RWRZaCMTTB56FXx8JpWnzQ#125095356c17cb8d_trunkWebCorepageChromecpp>
>    - trunk/WebCore/page/Geolocation.cpp<http://mail.google.com/mail/?ui=2&view=js&name=js&ver=AQ_JYcbp6cc.zh_CN.&am=!Iec9iPCj39i5BXHC0fIvctR3RWRZaCMTTB56FXx8JpWnzQ#125095356c17cb8d_trunkWebCorepageGeolocationcpp>
>
>  Diff
> Modified: trunk/WebCore/ChangeLog (51132 => 51133)
>
> --- trunk/WebCore/ChangeLog	2009-11-18 22:02:32 UTC (rev 51132)
> +++ trunk/WebCore/ChangeLog	2009-11-18 22:04:29 UTC (rev 51133)@@ -1,3 +1,16 @@+2009-11-18  Sam Weinig  <sam at webkit.org>
> +
> +        Reviewed by Anders Carlsson.
> +
> +        Fix two Geolocation assertions.
> +
> +        * page/Chrome.cpp:
> +        (WebCore::Chrome::requestGeolocationPermissionForFrame): No need to use PageGroupLoadDeferrer since this
> +        is not called from JS.
> +        * page/Geolocation.cpp:
> +        (WebCore::Geolocation::Watchers::set): The PassRefPtr was getting nulled out, so we need to put it in
> +        a RefPtr first.
> + 2009-11-18  Alexey Proskuryakov  <ap at apple.com>          Case sensitive file system build fix.
>
>  Modified: trunk/WebCore/page/Chrome.cpp (51132 => 51133)
>
> --- trunk/WebCore/page/Chrome.cpp	2009-11-18 22:02:32 UTC (rev 51132)
> +++ trunk/WebCore/page/Chrome.cpp	2009-11-18 22:04:29 UTC (rev 51133)@@ -407,11 +407,6 @@  void Chrome::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) {-    // Defer loads in case the client method runs a new event loop that would
> -    // otherwise cause the load to continue while we're in the middle of executing JavaScript.
> -    PageGroupLoadDeferrer deferrer(m_page, true);
> -
> -    ASSERT(frame);     m_client->requestGeolocationPermissionForFrame(frame, geolocation); }
>
>  Modified: trunk/WebCore/page/Geolocation.cpp (51132 => 51133)
>
> --- trunk/WebCore/page/Geolocation.cpp	2009-11-18 22:02:32 UTC (rev 51132)
> +++ trunk/WebCore/page/Geolocation.cpp	2009-11-18 22:04:29 UTC (rev 51133)@@ -88,10 +88,12 @@     m_geolocation->requestTimedOut(this); } -void Geolocation::Watchers::set(int id, PassRefPtr<GeoNotifier> notifier)+void Geolocation::Watchers::set(int id, PassRefPtr<GeoNotifier> prpNotifier) {-    m_idToNotifierMap.set(id, notifier);
> -    m_notifierToIdMap.set(notifier, id);+    RefPtr<GeoNotifier> notifier = prpNotifier;
> +
> +    m_idToNotifierMap.set(id, notifier.get());
> +    m_notifierToIdMap.set(notifier.release(), id); }  void Geolocation::Watchers::remove(int id)
>
>
> _______________________________________________
> webkit-changes mailing list
> webkit-changes at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-changes/attachments/20091130/06ff0ac0/attachment-0001.html>


More information about the webkit-changes mailing list