Changeset 31173 in webkit for trunk/JavaScriptCore/kjs/JSGlobalObject.h
- Timestamp:
- Mar 20, 2008, 2:34:47 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSGlobalObject.h
r31167 r31173 25 25 26 26 #include "JSVariableObject.h" 27 #include "Activation.h" 27 28 28 29 namespace KJS { … … 264 265 } 265 266 267 inline ActivationImp* JSGlobalObject::pushActivation(ExecState* exec) 268 { 269 if (d()->activationCount == activationStackNodeSize) { 270 ActivationStackNode* newNode = new ActivationStackNode; 271 newNode->prev = d()->activations; 272 d()->activations = newNode; 273 d()->activationCount = 0; 274 } 275 276 StackActivation* stackEntry = &d()->activations->data[d()->activationCount++]; 277 stackEntry->activationStorage.init(exec); 278 return &stackEntry->activationStorage; 279 } 280 281 inline void JSGlobalObject::checkActivationCount() 282 { 283 if (!d()->activationCount) { 284 ActivationStackNode* prev = d()->activations->prev; 285 ASSERT(prev); 286 delete d()->activations; 287 d()->activations = prev; 288 d()->activationCount = activationStackNodeSize; 289 } 290 } 291 292 inline void JSGlobalObject::popActivation() 293 { 294 checkActivationCount(); 295 d()->activations->data[--d()->activationCount].activationDataStorage.localStorage.shrink(0); 296 } 297 266 298 } // namespace KJS 267 299
Note:
See TracChangeset
for help on using the changeset viewer.