Changeset 17507 in webkit for trunk/JavaScriptCore/kjs/function.cpp
- Timestamp:
- Oct 31, 2006, 6:14:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.cpp
r17483 r17507 220 220 Context* context = exec->m_context; 221 221 while (context) { 222 if (context->function() == thisObj) {222 if (context->function() == thisObj) 223 223 return static_cast<ActivationImp*>(context->activationObject())->get(exec, propertyName); 224 }225 224 context = context->callingContext(); 226 225 } … … 230 229 JSValue* FunctionImp::callerGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot) 231 230 { 232 FunctionImp* thisObj = static_cast<FunctionImp* 231 FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase()); 233 232 Context* context = exec->m_context; 234 233 while (context) { 235 if (context->function() == thisObj) 236 return (context->callingContext()->function()) ? context->callingContext()->function() : jsNull(); 237 234 if (context->function() == thisObj) 235 break; 238 236 context = context->callingContext(); 239 237 } 240 return jsNull(); 238 239 if (!context) 240 return jsNull(); 241 242 Context* callingContext = context->callingContext(); 243 if (!callingContext) 244 return jsNull(); 245 246 FunctionImp* callingFunction = callingContext->function(); 247 if (!callingFunction) 248 return jsNull(); 249 250 return callingFunction; 241 251 } 242 252
Note:
See TracChangeset
for help on using the changeset viewer.