Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1458)

Unified Diff: src/bootstrapper.h

Issue 1094014: Merge the partial_snapshots branch back into bleeding_edge. For... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/bootstrapper.h
===================================================================
--- src/bootstrapper.h (revision 4215)
+++ src/bootstrapper.h (working copy)
@@ -32,6 +32,24 @@
namespace v8 {
namespace internal {
+
+class BootstrapperActive BASE_EMBEDDED {
+ public:
+ BootstrapperActive() { nesting_++; }
+ ~BootstrapperActive() { nesting_--; }
+
+ // Support for thread preemption.
+ static int ArchiveSpacePerThread();
+ static char* ArchiveState(char* to);
+ static char* RestoreState(char* from);
+
+ private:
+ static bool IsActive() { return nesting_ != 0; }
+ static int nesting_;
+ friend class Bootstrapper;
+};
+
+
// The Boostrapper is the public interface for creating a JavaScript global
// context.
class Bootstrapper : public AllStatic {
@@ -53,15 +71,11 @@
// Traverses the pointers for memory management.
static void Iterate(ObjectVisitor* v);
- // Accessors for the native scripts cache. Used in lazy loading.
+ // Accessor for the native scripts source code.
static Handle<String> NativesSourceLookup(int index);
- static bool NativesCacheLookup(Vector<const char> name,
- Handle<SharedFunctionInfo>* handle);
- static void NativesCacheAdd(Vector<const char> name,
- Handle<SharedFunctionInfo> fun);
// Tells whether bootstrapping is active.
- static bool IsActive();
+ static bool IsActive() { return BootstrapperActive::IsActive(); }
// Encoding/decoding support for fixup flags.
class FixupFlagsUseCodeObject: public BitField<bool, 0, 1> {};
@@ -76,6 +90,10 @@
// This will allocate a char array that is deleted when V8 is shut down.
// It should only be used for strictly finite allocations.
static char* AllocateAutoDeletedArray(int bytes);
+
+ // Used for new context creation.
+ static bool InstallExtensions(Handle<Context> global_context,
+ v8::ExtensionConfiguration* extensions);
};

Powered by Google App Engine
This is Rietveld 408576698