[Webkit-unassigned] [Bug 42447] New: DeviceOrientationEvent.h should not forward-declare DeviceOrientation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 16 04:51:10 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42447

           Summary: DeviceOrientationEvent.h should not forward-declare
                    DeviceOrientation
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hans at chromium.org


Because DeviceOrientationEvent has a member m_orientation of type RefPtr<DeviceOrientation>, the generated ~DeviceOrientationEvent() will destruct the RefPtr and eventually end up doing ptr->deref() in PassRefPtr.h:58, with ptr as an incomplete type.

Clang gives an error about this when building Chrome:

In file included from third_party/WebKit/WebCore/dom/Document.cpp:27:
In file included from third_party/WebKit/WebCore/dom/Document.h:29:
In file included from third_party/WebKit/WebCore/loader/CachedResourceHandle.h:29:
In file included from third_party/WebKit/WebCore/loader/CachedResource.h:28:
In file included from third_party/WebKit/WebCore/platform/text/PlatformString.h:28:
In file included from third_party/WebKit/JavaScriptCore/wtf/text/WTFString.h:28:
In file included from third_party/WebKit/JavaScriptCore/wtf/text/StringImpl.h:28:
In file included from third_party/WebKit/JavaScriptCore/wtf/CrossThreadRefCounted.h:35:
third_party/WebKit/JavaScriptCore/wtf/PassRefPtr.h:58:16: error: member access into incomplete type
      'WebCore::DeviceOrientation'
            ptr->deref();
               ^
In file included from third_party/WebKit/WebCore/dom/Document.cpp:27:
In file included from third_party/WebKit/WebCore/dom/Document.h:29:
In file included from third_party/WebKit/WebCore/loader/CachedResourceHandle.h:29:
In file included from third_party/WebKit/WebCore/loader/CachedResource.h:28:
In file included from third_party/WebKit/WebCore/platform/text/PlatformString.h:28:
In file included from third_party/WebKit/JavaScriptCore/wtf/text/WTFString.h:28:
In file included from third_party/WebKit/JavaScriptCore/wtf/text/StringImpl.h:32:
In file included from third_party/WebKit/JavaScriptCore/wtf/Vector.h:28:
In file included from third_party/WebKit/JavaScriptCore/wtf/VectorTraits.h:25:
third_party/WebKit/JavaScriptCore/wtf/RefPtr.h:56:35: note: in instantiation of function template specialization
      'WTF::derefIfNotNull<WebCore::DeviceOrientation>' requested here
        ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
                                  ^
In file included from third_party/WebKit/WebCore/dom/Document.cpp:47:
third_party/WebKit/WebCore/dom/DeviceOrientationEvent.h:35:7: note: in instantiation of member function
      'WTF::RefPtr<WebCore::DeviceOrientation>::~RefPtr' requested here
class DeviceOrientationEvent : public Event {
      ^
third_party/WebKit/WebCore/dom/DeviceOrientationEvent.h:33:7: note: forward declaration of
      'WebCore::DeviceOrientation'
class DeviceOrientation;

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list