Promise jobs should use it's saved Context value (#29)

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
김승현/Web Platform Lab(S/W센터)/Engineer/삼성전자 2017-11-23 17:37:21 +09:00 committed by 양지윤/Web Platform Lab(S/W센터)/Engineer/삼성전자
commit 13808ec66a
11 changed files with 55 additions and 28 deletions

View file

@ -46,7 +46,7 @@ NEVER_INLINE bool eval(Escargot::Context* context, Escargot::String* str, Escarg
#ifdef ESCARGOT_ENABLE_PROMISE
Escargot::DefaultJobQueue* jobQueue = Escargot::DefaultJobQueue::get(context->jobQueue());
while (jobQueue->hasNextJob()) {
auto jobResult = jobQueue->nextJob()->run(state);
auto jobResult = jobQueue->nextJob()->run();
if (shouldPrintScriptResult) {
if (!jobResult.result.isEmpty()) {
printf("%s\n", jobResult.result.toString(state)->toUTF8StringData().data());