diff options
Diffstat (limited to 'deps/v8/src/v8.h')
-rw-r--r-- | deps/v8/src/v8.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/deps/v8/src/v8.h b/deps/v8/src/v8.h index cc1673e13..e74a60c2f 100644 --- a/deps/v8/src/v8.h +++ b/deps/v8/src/v8.h @@ -1,4 +1,4 @@ -// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -35,13 +35,10 @@ #if defined(GOOGLE3) // Google3 special flag handling. #if defined(DEBUG) && defined(NDEBUG) -// If both are defined in Google3, then we are building an optimized v8 with -// assertions enabled. +// V8 only uses DEBUG and whenever it is set we are building a debug +// version of V8. We do not use NDEBUG and simply undef it here for +// consistency. #undef NDEBUG -#elif !defined(DEBUG) && !defined(NDEBUG) -// If neither is defined in Google3, then we are building a debug v8. Mark it -// as such. -#define DEBUG #endif #endif // defined(GOOGLE3) @@ -66,6 +63,7 @@ #include "log-inl.h" #include "cpu-profiler-inl.h" #include "handles-inl.h" +#include "isolate-inl.h" namespace v8 { namespace internal { @@ -84,8 +82,8 @@ class V8 : public AllStatic { static void TearDown(); static bool IsRunning() { return is_running_; } static bool UseCrankshaft() { return use_crankshaft_; } - static void DisableCrankshaft() { use_crankshaft_ = false; } // To be dead you have to have lived + // TODO(isolates): move IsDead to Isolate. static bool IsDead() { return has_fatal_error_ || has_been_disposed_; } static void SetFatalError(); @@ -94,18 +92,21 @@ class V8 : public AllStatic { bool take_snapshot = false); // Random number generation support. Not cryptographically safe. - static uint32_t Random(); + static uint32_t Random(Isolate* isolate); // We use random numbers internally in memory allocation and in the // compilers for security. In order to prevent information leaks we // use a separate random state for internal random number // generation. - static uint32_t RandomPrivate(); - static Object* FillHeapNumberWithRandom(Object* heap_number); + static uint32_t RandomPrivate(Isolate* isolate); + static Object* FillHeapNumberWithRandom(Object* heap_number, + Isolate* isolate); // Idle notification directly from the API. static bool IdleNotification(); private: + static void InitializeOncePerProcess(); + // True if engine is currently running static bool is_running_; // True if V8 has ever been run |