Changeset 9781 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Jul 14, 2005, 3:32:17 PM (20 years ago)
Author:
ggaren
Message:
  • test failure: ecma_3/Function/regress-104584.js

Reviewed by mjs.

  • kjs/interpreter.cpp: (Interpreter::finalCheck): removed misleading while && comment
  • kjs/testkjs.cpp: added "gc" function to global object (TestFunctionImp::): (TestFunctionImp::call): (main):
  • tests/mozilla/expected.html:
Location:
trunk/JavaScriptCore/kjs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/interpreter.cpp

    r9768 r9781  
    311311{
    312312  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();
    318314
    319315  Node::finalCheck();
  • trunk/JavaScriptCore/kjs/testkjs.cpp

    r9768 r9781  
    3030#include "types.h"
    3131#include "interpreter.h"
     32#include "collector.h"
    3233
    3334using namespace KJS;
     
    3940  virtual Value call(ExecState *exec, Object &thisObj, const List &args);
    4041
    41   enum { Print, Debug, Quit };
     42  enum { Print, Debug, Quit, GC };
    4243
    4344private:
     
    6061    exit(0);
    6162    return Undefined();
     63  case GC:
     64    Interpreter::lock();
     65    Collector::collect();
     66    Interpreter::unlock();
     67    break;
    6268  default:
    6369    break;
     
    108114    // add "quit" for compatibility with the mozilla js shell
    109115    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)));
    110118    // add "version" for compatibility with the mozilla js shell
    111119    global.put(interp.globalExec(), "version", Object(new VersionFunctionImp()));
Note: See TracChangeset for help on using the changeset viewer.