Ignore:
Timestamp:
Oct 26, 2007, 3:36:45 AM (18 years ago)
Author:
mjs
Message:

Windows build fix.

File:
1 edited

Legend:

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

    r27097 r27100  
    7070
    7171  // enter a new execution context
    72   Context ctx(globalObj, exec->dynamicInterpreter(), thisObj, body.get(),
    73                  FunctionCode, exec->context(), this, &args);
    74   ExecState newExec(exec->dynamicInterpreter(), &ctx);
     72  ExecState newExec(exec->dynamicInterpreter(), globalObj, thisObj, body.get(),
     73                    FunctionCode, exec, this, &args);
    7574  if (exec->hadException())
    7675    newExec.setException(exec->exception());
    77   ctx.setExecState(&newExec);
    7876
    7977  Debugger* dbg = exec->dynamicInterpreter()->debugger();
     
    128126{
    129127  FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
    130   Context* context = exec->m_context;
    131   while (context) {
    132     if (context->function() == thisObj)
    133       return static_cast<ActivationImp*>(context->activationObject())->get(exec, propertyName);
    134     context = context->callingContext();
     128  ExecState* e = exec;
     129  while (e) {
     130    if (e->function() == thisObj)
     131      return static_cast<ActivationImp*>(e->activationObject())->get(exec, propertyName);
     132    e = e->callingExecState();
    135133  }
    136134  return jsNull();
     
    140138{
    141139    FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
    142     Context* context = exec->m_context;
    143     while (context) {
    144         if (context->function() == thisObj)
     140    ExecState* e = exec;
     141    while (e) {
     142        if (e->function() == thisObj)
    145143            break;
    146         context = context->callingContext();
    147     }
    148 
    149     if (!context)
     144        e = e->callingExecState();
     145    }
     146
     147    if (!e)
    150148        return jsNull();
    151149   
    152     Context* callingContext = context->callingContext();
    153     if (!callingContext)
     150    ExecState* callingExecState = e->callingExecState();
     151    if (!callingExecState)
    154152        return jsNull();
    155153   
    156     FunctionImp* callingFunction = callingContext->function();
     154    FunctionImp* callingFunction = callingExecState->function();
    157155    if (!callingFunction)
    158156        return jsNull();
     
    745743        // enter a new execution context
    746744        Interpreter* interpreter = switchGlobal ? static_cast<JSGlobalObject*>(thisObj)->interpreter() : exec->dynamicInterpreter();
    747         JSObject* thisVal = static_cast<JSObject*>(exec->context()->thisValue());
    748         Context ctx(interpreter->globalObject(),
    749                        interpreter,
    750                        thisVal,
    751                        progNode.get(),
    752                        EvalCode,
    753                        exec->context());
    754         ExecState newExec(interpreter, &ctx);
     745        JSObject* thisVal = static_cast<JSObject*>(exec->thisValue());
     746        ExecState newExec(interpreter, interpreter->globalObject(), thisVal, progNode.get(), EvalCode, exec);
    755747        if (exec->hadException())
    756748            newExec.setException(exec->exception());
    757         ctx.setExecState(&newExec);
    758749         
    759750        if (switchGlobal) {
    760             ctx.pushScope(thisObj);
    761             ctx.setVariableObject(thisObj);
     751            newExec.pushScope(thisObj);
     752            newExec.setVariableObject(thisObj);
    762753        }
    763754       
     
    765756         
    766757        if (switchGlobal)
    767             ctx.popScope();
     758            newExec.popScope();
    768759
    769760        // if an exception occured, propogate it back to the previous execution object
Note: See TracChangeset for help on using the changeset viewer.