Changeset 28328 in webkit for trunk/JavaScriptCore/kjs/interpreter.h
- Timestamp:
- Dec 2, 2007, 11:43:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/interpreter.h
r28309 r28328 79 79 class Interpreter { 80 80 friend class Collector; 81 friend class JSGlobalObject; 82 81 83 public: 82 84 /** … … 85 87 */ 86 88 Interpreter(); 87 88 virtual ~Interpreter(); // only deref should delete us 89 ~Interpreter(); 89 90 90 91 /** … … 117 118 */ 118 119 JSGlobalObject* globalObject() const; 119 120 /**121 * Returns the execution state object which can be used to execute122 * scripts using this interpreter at a the "global" level, i.e. one123 * with a execution context that has the global object as the "this"124 * value, and who's scope chain contains only the global object.125 *126 * Note: this pointer remains constant for the life of the interpreter127 * and should not be manually deleted.128 *129 * @return The interpreter global execution state object130 */131 virtual ExecState *globalExec();132 120 133 121 /** … … 281 269 CompatMode compatMode() const { return m_compatMode; } 282 270 283 /**284 * Run the garbage collection. Returns true when at least one object285 * was collected; false otherwise.286 */287 static bool collect();288 289 /**290 * Called during the mark phase of the garbage collector. Subclasses291 * implementing custom mark methods must make sure to chain to this one.292 */293 virtual void mark();294 295 271 static bool shouldPrintExceptions(); 296 272 static void setShouldPrintExceptions(bool); … … 299 275 void restoreBuiltins (const SavedBuiltins&); 300 276 301 /**302 * Determine if the it is 'safe' to execute code in the target interpreter from an303 * object that originated in this interpreter. This check is used to enforce WebCore304 * cross frame security rules. In particular, attempts to access 'bound' objects are305 * not allowed unless isSafeScript returns true.306 */307 virtual bool isSafeScript(const Interpreter*) { return true; }308 309 277 // Chained list of interpreters (ring) 310 278 static Interpreter* firstInterpreter() { return s_hook; } … … 325 293 bool timedOut(); 326 294 295 ExecState m_globalExec; // This is temporarily public to help with bootstrapping. 296 327 297 protected: 328 virtual bool shouldInterruptScript() const { return true; }329 330 298 unsigned m_timeoutTime; 331 299 … … 345 313 ExecState* m_currentExec; 346 314 JSGlobalObject* m_globalObject; 347 ExecState m_globalExec;348 315 349 316 // Chained list of interpreters (ring) - for collector
Note:
See TracChangeset
for help on using the changeset viewer.