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

Side by Side Diff: src/v8.h

Issue 23597013: Remove obsolete global V8::IsRunning() predicate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/v8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class V8 : public AllStatic { 75 class V8 : public AllStatic {
76 public: 76 public:
77 // Global actions. 77 // Global actions.
78 78
79 // If Initialize is called with des == NULL, the initial state is 79 // If Initialize is called with des == NULL, the initial state is
80 // created from scratch. If a non-null Deserializer is given, the 80 // created from scratch. If a non-null Deserializer is given, the
81 // initial state is created by reading the deserialized data into an 81 // initial state is created by reading the deserialized data into an
82 // empty heap. 82 // empty heap.
83 static bool Initialize(Deserializer* des); 83 static bool Initialize(Deserializer* des);
84 static void TearDown(); 84 static void TearDown();
85 static bool IsRunning() { return is_running_; }
86 // To be dead you have to have lived 85 // To be dead you have to have lived
87 // TODO(isolates): move IsDead to Isolate. 86 // TODO(isolates): move IsDead to Isolate.
88 static bool IsDead() { return has_fatal_error_ || has_been_disposed_; } 87 static bool IsDead() { return has_fatal_error_ || has_been_disposed_; }
89 static void SetFatalError(); 88 static void SetFatalError();
90 89
91 // Report process out of memory. Implementation found in api.cc. 90 // Report process out of memory. Implementation found in api.cc.
92 static void FatalProcessOutOfMemory(const char* location, 91 static void FatalProcessOutOfMemory(const char* location,
93 bool take_snapshot = false); 92 bool take_snapshot = false);
94 93
95 // Allows an entropy source to be provided for use in random number 94 // Allows an entropy source to be provided for use in random number
(...skipping 27 matching lines...) Expand all
123 122
124 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { 123 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) {
125 CHECK_EQ(NULL, array_buffer_allocator_); 124 CHECK_EQ(NULL, array_buffer_allocator_);
126 array_buffer_allocator_ = allocator; 125 array_buffer_allocator_ = allocator;
127 } 126 }
128 127
129 private: 128 private:
130 static void InitializeOncePerProcessImpl(); 129 static void InitializeOncePerProcessImpl();
131 static void InitializeOncePerProcess(); 130 static void InitializeOncePerProcess();
132 131
133 // True if engine is currently running
134 static bool is_running_;
135 // True if V8 has ever been run 132 // True if V8 has ever been run
136 static bool has_been_set_up_; 133 static bool has_been_set_up_;
137 // True if error has been signaled for current engine 134 // True if error has been signaled for current engine
138 // (reset to false if engine is restarted) 135 // (reset to false if engine is restarted)
139 static bool has_fatal_error_; 136 static bool has_fatal_error_;
140 // True if engine has been shut down 137 // True if engine has been shut down
141 // (reset if engine is restarted) 138 // (reset if engine is restarted)
142 static bool has_been_disposed_; 139 static bool has_been_disposed_;
143 // List of callbacks when a Call completes. 140 // List of callbacks when a Call completes.
144 static List<CallCompletedCallback>* call_completed_callbacks_; 141 static List<CallCompletedCallback>* call_completed_callbacks_;
145 // Allocator for external array buffers. 142 // Allocator for external array buffers.
146 static v8::ArrayBuffer::Allocator* array_buffer_allocator_; 143 static v8::ArrayBuffer::Allocator* array_buffer_allocator_;
147 }; 144 };
148 145
149 146
150 // JavaScript defines two kinds of 'nil'. 147 // JavaScript defines two kinds of 'nil'.
151 enum NilValue { kNullValue, kUndefinedValue }; 148 enum NilValue { kNullValue, kUndefinedValue };
152 149
153 150
154 } } // namespace v8::internal 151 } } // namespace v8::internal
155 152
156 namespace i = v8::internal; 153 namespace i = v8::internal;
157 154
158 #endif // V8_V8_H_ 155 #endif // V8_V8_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698