Closed Bug 1046222 Opened 10 years ago Closed 10 years ago

Make XPCOM_DEBUG_BREAK default to "warn" on Windows

Categories

(Core :: XPCOM, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: vlad, Assigned: vlad)

Details

Attachments

(1 file)

Right now, it defaults to "trap", which when run under the debugger, causes a breakpoint.  We still have many assertions, and this is just an unnecessary annoyance when debugging on windows.  Developers need to know to edit the visual studio project environment variables to set XPCOM_DEBUG_BREAK=warn in order to debug.

On other platforms, it defaults to "warn".  Let's do the same on windows?  Specifically, this code in nsDebugImpl.cpp:


#if defined(XP_WIN) && defined(MOZ_METRO)
  if (IsRunningInWindowsMetro()) {
    gAssertBehavior = NS_ASSERT_WARN;
  } else {
    gAssertBehavior = NS_ASSERT_TRAP;
  }
#elif defined(XP_WIN)
  gAssertBehavior = NS_ASSERT_TRAP;
#else
  gAssertBehavior = NS_ASSERT_WARN;
#endif

needs to just be gAssertBehavior = NS_ASSERT_WARN.
Default to "warn" behaviour on Windows to avoid development papercut.
Assignee: nobody → vladimir
Attachment #8464783 - Flags: review?(benjamin)
Comment on attachment 8464783 [details] [diff] [review]
default to "warn" on Windows

Please announce to dev.platform.
Attachment #8464783 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/0f471ba800e1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: