Changeset 212616 in webkit for trunk/Source/JavaScriptCore/jsc.cpp
- Timestamp:
- Feb 19, 2017, 2:07:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jsc.cpp
r212535 r212616 39 39 #include "HeapProfiler.h" 40 40 #include "HeapSnapshotBuilder.h" 41 #include "HeapStatistics.h" 41 42 #include "InitializeThreading.h" 42 43 #include "Interpreter.h" … … 1084 1085 static EncodedJSValue JSC_HOST_CALL functionWaitForReport(ExecState*); 1085 1086 static EncodedJSValue JSC_HOST_CALL functionHeapCapacity(ExecState*); 1086 static EncodedJSValue JSC_HOST_CALL functionFlashHeapAccess(ExecState*);1087 1087 1088 1088 struct Script { … … 1367 1367 1368 1368 addFunction(vm, "heapCapacity", functionHeapCapacity, 0); 1369 addFunction(vm, "flashHeapAccess", functionFlashHeapAccess, 0);1370 1369 } 1371 1370 … … 2650 2649 } 2651 2650 2652 EncodedJSValue JSC_HOST_CALL functionFlashHeapAccess(ExecState* exec)2653 {2654 VM& vm = exec->vm();2655 auto scope = DECLARE_THROW_SCOPE(vm);2656 2657 vm.heap.releaseAccess();2658 if (exec->argumentCount() >= 1) {2659 double ms = exec->argument(0).toNumber(exec);2660 RETURN_IF_EXCEPTION(scope, encodedJSValue());2661 sleep(Seconds::fromMilliseconds(ms));2662 }2663 vm.heap.acquireAccess();2664 return JSValue::encode(jsUndefined());2665 }2666 2667 2651 template<typename ValueType> 2668 2652 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.