From 6b7e71a22fa68fc1416a0f4dfa8060bdf7365b02 Mon Sep 17 00:00:00 2001 From: "kasperl@chromium.org" Date: Mon, 8 Sep 2008 07:01:12 +0000 Subject: [PATCH] Fix issues 28 and 30 by changed the header guard to V8_H_ and including HandleScope::ZapRange in release mode. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- include/v8-debug.h | 6 +++--- include/v8.h | 8 +++----- src/api.cc | 2 -- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/include/v8-debug.h b/include/v8-debug.h index 8881e4a29..6ac120253 100644 --- a/include/v8-debug.h +++ b/include/v8-debug.h @@ -25,8 +25,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef _V8_DEBUG -#define _V8_DEBUG +#ifndef V8_DEBUG_H_ +#define V8_DEBUG_H_ #include "v8.h" @@ -140,4 +140,4 @@ class EXPORT Debug { #undef EXPORT -#endif // _V8_DEBUG +#endif // V8_DEBUG_H_ diff --git a/include/v8.h b/include/v8.h index 683c55a52..4646e812c 100644 --- a/include/v8.h +++ b/include/v8.h @@ -35,8 +35,8 @@ * For other documentation see http://code.google.com/apis/v8/ */ -#ifndef _V8 -#define _V8 +#ifndef V8_H_ +#define V8_H_ #include @@ -461,10 +461,8 @@ class EXPORT HandleScope { /** Deallocates any extensions used by the current scope.*/ static void DeleteExtensions(); -#ifdef DEBUG // Zaps the handles in the half-open interval [start, end). static void ZapRange(void** start, void** end); -#endif friend class ImplementationUtilities; }; @@ -2311,4 +2309,4 @@ void Template::Set(const char* name, v8::Handle value) { #undef TYPE_CHECK -#endif // _V8 +#endif // V8_H_ diff --git a/src/api.cc b/src/api.cc index ac11277d0..6ff2bd69e 100644 --- a/src/api.cc +++ b/src/api.cc @@ -446,14 +446,12 @@ void v8::HandleScope::DeleteExtensions() { } -#ifdef DEBUG void HandleScope::ZapRange(void** start, void** end) { if (start == NULL) return; for (void** p = start; p < end; p++) { *p = reinterpret_cast(v8::internal::kHandleZapValue); } } -#endif void** v8::HandleScope::RawClose(void** value) { -- 2.34.1