Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion question about assert macro
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ben Noordhuis  
View profile  
 More options Feb 8 2012, 11:13 am
From: Ben Noordhuis <i...@bnoordhuis.nl>
Date: Wed, 8 Feb 2012 17:13:45 +0100
Local: Wed, Feb 8 2012 11:13 am
Subject: Re: [nodejs] question about assert macro

On Wed, Feb 8, 2012 at 16:44, billywhizz <apjohn...@gmail.com> wrote:
> I'm confused about the usage of assert everywhere in the c++ bindings
> in the production release. shouldn't assert only be used in debug
> mode?

Yes, and eventually we will. Note that V8 assertions are already
compiled away in release builds.

> won't all these asserts hurt performance?

Not really. They're quite cheap with maybe one or two exceptions.

> as a result of the assert, i don't seem to be able to catch the error
> anywhere in uncaughtException handler or in SIG* handlers.

That's correct. Assertions are sanity checks, they check for internal
consistency. If an assertion triggers, it means the program is in an
undefined state. A C++ assertion that triggers is *always* a bug so
please report it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.