Changeset 9781 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Jul 14, 2005, 3:32:17 PM (20 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/interpreter.cpp
r9768 r9781 311 311 { 312 312 fprintf(stderr,"Interpreter::finalCheck()\n"); 313 // Garbage collect - as many times as necessary 314 // (we could delete an object which was holding another object, so 315 // the deref() will happen too late for deleting the impl of the 2nd object). 316 while( Collector::collect() ) 317 ; 313 Collector::collect(); 318 314 319 315 Node::finalCheck(); -
trunk/JavaScriptCore/kjs/testkjs.cpp
r9768 r9781 30 30 #include "types.h" 31 31 #include "interpreter.h" 32 #include "collector.h" 32 33 33 34 using namespace KJS; … … 39 40 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 40 41 41 enum { Print, Debug, Quit };42 enum { Print, Debug, Quit, GC }; 42 43 43 44 private: … … 60 61 exit(0); 61 62 return Undefined(); 63 case GC: 64 Interpreter::lock(); 65 Collector::collect(); 66 Interpreter::unlock(); 67 break; 62 68 default: 63 69 break; … … 108 114 // add "quit" for compatibility with the mozilla js shell 109 115 global.put(interp.globalExec(), "quit", Object(new TestFunctionImp(TestFunctionImp::Quit,0))); 116 // add "gc" for compatibility with the mozilla js shell 117 global.put(interp.globalExec(), "gc", Object(new TestFunctionImp(TestFunctionImp::GC,0))); 110 118 // add "version" for compatibility with the mozilla js shell 111 119 global.put(interp.globalExec(), "version", Object(new VersionFunctionImp()));
Note:
See TracChangeset
for help on using the changeset viewer.