Changeset 183974 in webkit for trunk/Source/JavaScriptCore/jsc.cpp
- Timestamp:
- May 7, 2015, 7:12:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jsc.cpp
r183962 r183974 448 448 static EncodedJSValue JSC_HOST_CALL functionFullGC(ExecState*); 449 449 static EncodedJSValue JSC_HOST_CALL functionEdenGC(ExecState*); 450 static EncodedJSValue JSC_HOST_CALL functionHeapSize(ExecState*); 450 451 static EncodedJSValue JSC_HOST_CALL functionDeleteAllCompiledCode(ExecState*); 451 452 #ifndef NDEBUG … … 587 588 addFunction(vm, "fullGC", functionFullGC, 0); 588 589 addFunction(vm, "edenGC", functionEdenGC, 0); 590 addFunction(vm, "gcHeapSize", functionHeapSize, 0); 589 591 addFunction(vm, "deleteAllCompiledCode", functionDeleteAllCompiledCode, 0); 590 592 #ifndef NDEBUG … … 835 837 JSLockHolder lock(exec); 836 838 exec->heap()->collectAllGarbage(); 837 return JSValue::encode(js Undefined());839 return JSValue::encode(jsNumber(exec->heap()->sizeAfterLastFullCollection())); 838 840 } 839 841 … … 842 844 JSLockHolder lock(exec); 843 845 exec->heap()->collect(FullCollection); 844 return JSValue::encode(js Undefined());846 return JSValue::encode(jsNumber(exec->heap()->sizeAfterLastFullCollection())); 845 847 } 846 848 … … 849 851 JSLockHolder lock(exec); 850 852 exec->heap()->collect(EdenCollection); 851 return JSValue::encode(jsUndefined()); 853 return JSValue::encode(jsNumber(exec->heap()->sizeAfterLastEdenCollection())); 854 } 855 856 EncodedJSValue JSC_HOST_CALL functionHeapSize(ExecState* exec) 857 { 858 JSLockHolder lock(exec); 859 return JSValue::encode(jsNumber(exec->heap()->size())); 852 860 } 853 861
Note:
See TracChangeset
for help on using the changeset viewer.