layout-debugger no longer builds in non-DEBUG builds

RESOLVED FIXED in Firefox 67

Status

()

defect
P1
normal
RESOLVED FIXED
5 months ago
5 months ago

People

(Reporter: mats, Assigned: cpeterson)

Tracking

({regression})

Trunk
mozilla67
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox65 unaffected, firefox66 unaffected, firefox67 fixed)

Details

Attachments

(1 attachment)

STR

  1. add the following lines to your .mozconfig and rebuild:
    ac_add_options --disable-debug
    ac_add_options --enable-layout-debugger
    export DEBUG_FRAME_DUMP=1
    mk_add_options DEBUG_FRAME_DUMP=1

ACTUAL RESULTS

6:44.47 In file included from /md1/objdir/md1/src/inbound/layout/tools/layout-debug/src/Unified_cpp_layout-debug_src0.cpp:20:
6:44.47 /md1/src/inbound/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp:107:14: error: unknown type name 'nsILayoutDebugger'; did you mean 'nsLayoutDebugCLH'?
6:44.47 nsCOMPtr<nsILayoutDebugger> ld = do_GetService(kLayoutDebuggerCID);
6:44.47 ^~~~~~~~~~~~~~~~~
6:44.47 nsLayoutDebugCLH
6:44.47 ../../../../../../../../src/inbound/layout/tools/layout-debug/src/nsLayoutDebugCLH.h:20:7: note: 'nsLayoutDebugCLH' declared here
6:44.47 class nsLayoutDebugCLH : public ICOMMANDLINEHANDLER {
6:44.47 ^
6:44.47 In file included from /md1/objdir/md1/src/inbound/layout/tools/layout-debug/src/Unified_cpp_layout-debug_src0.cpp:20:
6:44.47 /md1/src/inbound/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp:109:11: error: no member named 'GetShowFrameBorders' in 'nsLayoutDebugCLH'
6:44.48 ld->GetShowFrameBorders(&mVisualDebugging);
6:44.48 ~~ ^
6:44.48 /md1/src/inbound/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp:110:11: error: no member named 'GetShowEventTargetFrameBorder' in 'nsLayoutDebugCLH'
6:44.48 ld->GetShowEventTargetFrameBorder(&mVisualEventDebugging);
6:44.48 ~~ ^
6:44.48 /md1/src/inbound/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp:141:12: error: unknown type name 'nsILayoutDebugger'; did you mean 'nsLayoutDebugCLH'?
6:44.48 nsCOMPtr<nsILayoutDebugger> ld = do_GetService(kLayoutDebuggerCID);
6:44.48 ^~~~~~~~~~~~~~~~~
6:44.48 nsLayoutDebugCLH

Component: General → Layout

Chris, wanna take a look at this? Probably just a matter of removing the #ifdef or changing them for #ifdef MOZ_LAYOUT_DEBUGGER.

Flags: needinfo?(cpeterson)

Sorry. I will fix this.

Assignee: nobody → cpeterson
Flags: needinfo?(cpeterson)
Priority: -- → P1

btw, is the layout debugger expected to work in non-DEBUG builds? The nsLayoutDebugger class definition and NS_NewLayoutDebugger() factory function were #ifdef DEBUG even before my #ifdef changes in nsILayoutDebugger.h:

https://searchfox.org/mozilla-central/rev/aae527894a97ee3bbe0c2cfce9c67c59e8b8fcb9/layout/base/nsLayoutDebugger.cpp#25-26,44

So I would be surprised if do_GetService(kLayoutDebuggerCID) returned a usable object in non-DEBUG builds (though I haven't tested this):

https://searchfox.org/mozilla-central/rev/aae527894a97ee3bbe0c2cfce9c67c59e8b8fcb9/layout/tools/layout-debug/src/nsLayoutDebuggingTools.cpp#107

Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfb30a402bce
Fix layout debugger build in non-DEBUG builds. r=emilio
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.