| 116 | class TestWorkerWithResult : public AsyncWorker { |
| 117 | public: |
| 118 | static void DoWork(const CallbackInfo& info) { |
| 119 | bool succeed = info[0].As<Boolean>(); |
| 120 | Object resource = info[1].As<Object>(); |
| 121 | Function cb = info[2].As<Function>(); |
| 122 | Value data = info[3]; |
| 123 | |
| 124 | TestWorkerWithResult* worker = |
| 125 | new TestWorkerWithResult(cb, "TestResource", resource); |
| 126 | worker->Receiver().Set("data", data); |
| 127 | worker->_succeed = succeed; |
| 128 | worker->Queue(); |
| 129 | } |
| 130 | |
| 131 | protected: |
| 132 | void Execute() override { |