Changeset 128816 in webkit for trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
- Timestamp:
- Sep 17, 2012, 3:47:37 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r128813 r128816 364 364 365 365 JSObject* object = asObject(cell); 366 367 // Run this filter first, since it's cheap, and ought to filter out a lot of objects. 368 if (!hasBrokenIndexing(object)) 369 return; 366 370 367 371 // We only want to have a bad time in the affected global object, not in the entire 368 // VM. 369 if (object->unwrappedGlobalObject() != m_globalObject) 370 return; 371 372 if (!hasBrokenIndexing(object)) 372 // VM. But we have to be careful, since there may be objects that claim to belong to 373 // a different global object that has prototypes from our global object. 374 bool foundGlobalObject = false; 375 for (JSObject* current = object; ;) { 376 if (current->unwrappedGlobalObject() == m_globalObject) { 377 foundGlobalObject = true; 378 break; 379 } 380 381 JSValue prototypeValue = current->prototype(); 382 if (prototypeValue.isNull()) 383 break; 384 current = asObject(prototypeValue); 385 } 386 if (!foundGlobalObject) 373 387 return; 374 388
Note:
See TracChangeset
for help on using the changeset viewer.