Changeset 228488 in webkit for trunk/Source/JavaScriptCore/jsc.cpp
- Timestamp:
- Feb 14, 2018, 3:25:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jsc.cpp
r227898 r228488 343 343 static EncodedJSValue JSC_HOST_CALL functionFlashHeapAccess(ExecState*); 344 344 static EncodedJSValue JSC_HOST_CALL functionDisableRichSourceInfo(ExecState*); 345 static EncodedJSValue JSC_HOST_CALL functionMallocInALoop(ExecState*); 345 346 346 347 struct Script { … … 600 601 601 602 addFunction(vm, "disableRichSourceInfo", functionDisableRichSourceInfo, 0); 603 addFunction(vm, "mallocInALoop", functionMallocInALoop, 0); 602 604 } 603 605 … … 1749 1751 } 1750 1752 1753 EncodedJSValue JSC_HOST_CALL functionMallocInALoop(ExecState*) 1754 { 1755 Vector<void*> ptrs; 1756 for (unsigned i = 0; i < 5000; ++i) 1757 ptrs.append(fastMalloc(1024 * 2)); 1758 for (void* ptr : ptrs) 1759 fastFree(ptr); 1760 return JSValue::encode(jsUndefined()); 1761 } 1762 1751 1763 template<typename ValueType> 1752 1764 typename std::enable_if<!std::is_fundamental<ValueType>::value>::type addOption(VM&, JSObject*, Identifier, ValueType) { }
Note:
See TracChangeset
for help on using the changeset viewer.