[tbb-bugs] #16497 [Tor Browser]: debug build failure in nsContentUtils.cpp

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jul 20 17:42:18 UTC 2015


#16497: debug build failure in nsContentUtils.cpp
-----------------------------+-------------------------------
     Reporter:  mcs          |      Owner:  tbb-team
         Type:  defect       |     Status:  needs_information
     Priority:  normal       |  Milestone:
    Component:  Tor Browser  |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+-------------------------------

Comment (by mcs):

 The compilation error (from clang) is:
 {{{
 tor-browser/dom/base/nsContentUtils.cpp:3000:19: error:
       use of undeclared identifier 'aLoadingDocument'; did you mean
       'mozilla::LoadInfo::GetLoadingDocument'?
   NS_PRECONDITION(aLoadingDocument, "Must have a document");
                   ^~~~~~~~~~~~~~~~
                   mozilla::LoadInfo::GetLoadingDocument
 ../../dist/include/nsDebug.h:93:49: note: expanded from macro
 'NS_PRECONDITION'
 #define NS_PRECONDITION(expr, str) NS_ASSERTION(expr, str)
                                                 ^
 ../../dist/include/nsDebug.h:82:11: note: expanded from macro
 'NS_ASSERTION'
     if (!(expr)) {                                            \
           ^
 ../../dist/include/mozilla/LoadInfo.h:33:3: note:
       'mozilla::LoadInfo::GetLoadingDocument' declared here
   NS_DECL_NSILOADINFO
   ^
 ../../dist/include/nsILoadInfo.h:137:14: note: expanded from macro
       'NS_DECL_NSILOADINFO'
   NS_IMETHOD GetLoadingDocument(nsIDOMDocument * *aLoadingDocument)
 override; \
              ^
 /Users/brade/dev/tor/tor-browser/dom/base/nsContentUtils.cpp:3000:19:
 error:
       call to non-static member function without an object argument
   NS_PRECONDITION(aLoadingDocument, "Must have a document");
                   ^~~~~~~~~~~~~~~~
 ../../dist/include/nsDebug.h:93:49: note: expanded from macro
 'NS_PRECONDITION'
 #define NS_PRECONDITION(expr, str) NS_ASSERTION(expr, str)
                                                 ^
 ../../dist/include/nsDebug.h:82:11: note: expanded from macro
 'NS_ASSERTION'
     if (!(expr)) {                                            \
           ^
 2 errors generated.
 make[1]: *** [nsContentUtils.o] Error 1
 }}}

 It is caused by one of our patches:
 ac7de4b0b756891a3835e738ebe534c44d4855c4 (for #13670).  That patch
 replaces the aLoadingDocument parameter with aLoadingNode.  Since it is OK
 for aLoadingNode to be NULL, I do not think we need or want an
 NS_ASSERTION() for aLoadingNode.

 The bottom line:  the patch I attached to this bug is a fixup for the
 #13670 patch (I am sorry I did not mention that before).

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16497#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list