From 8e9a43fbc311270b6adfe578a70fbdf1ca83d644 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Mon, 2 Sep 2024 19:24:33 -0400 Subject: [PATCH] fix stack size --- doc/README.md | 2 +- .../classes/QuickJSAsyncContext.md | 8 ++++---- .../classes/QuickJSContext.md | 8 ++++---- .../errors/classes/QuickJSAsyncifyError.md | 2 +- .../classes/QuickJSAsyncifySuspended.md | 2 +- .../QuickJSEmptyGetOwnPropertyNames.md | 2 +- .../classes/QuickJSEmscriptenModuleError.md | 2 +- .../classes/QuickJSMemoryLeakDetected.md | 2 +- .../errors/classes/QuickJSNotImplemented.md | 2 +- .../errors/classes/QuickJSPromisePending.md | 2 +- .../errors/classes/QuickJSUnknownIntrinsic.md | 2 +- .../errors/classes/QuickJSUnwrapError.md | 19 ++++++++++++++++--- .../errors/classes/QuickJSUseAfterFree.md | 2 +- .../errors/classes/QuickJSWrongOwner.md | 2 +- doc/quickjs-emscripten/README.md | 2 +- .../classes/QuickJSAsyncContext.md | 8 ++++---- .../classes/QuickJSContext.md | 8 ++++---- .../errors/classes/QuickJSAsyncifyError.md | 2 +- .../classes/QuickJSAsyncifySuspended.md | 2 +- .../QuickJSEmptyGetOwnPropertyNames.md | 2 +- .../classes/QuickJSEmscriptenModuleError.md | 2 +- .../classes/QuickJSMemoryLeakDetected.md | 2 +- .../errors/classes/QuickJSNotImplemented.md | 2 +- .../errors/classes/QuickJSPromisePending.md | 2 +- .../errors/classes/QuickJSUnknownIntrinsic.md | 2 +- .../errors/classes/QuickJSUnwrapError.md | 19 ++++++++++++++++--- .../errors/classes/QuickJSUseAfterFree.md | 2 +- .../errors/classes/QuickJSWrongOwner.md | 2 +- .../quickjs-emscripten-core/src/context.ts | 6 +++--- .../quickjs-emscripten-core/src/errors.ts | 8 ++++++-- .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + .../Makefile | 1 + 51 files changed, 100 insertions(+), 49 deletions(-) diff --git a/doc/README.md b/doc/README.md index 73d24aa6..02aca07c 100644 --- a/doc/README.md +++ b/doc/README.md @@ -48,7 +48,7 @@ main() [values]: #interfacing-with-the-interpreter [asyncify]: #asyncify [functions]: #exposing-apis -[quickjs-for-quickjs]: https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-for-quickjs +[quickjs-for-quickjs]: https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-for-quickjs - [quickjs-emscripten](#quickjs-emscripten) - [Usage](#usage) diff --git a/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md index 754d4bc9..5b8bd776 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSAsyncContext.md @@ -389,7 +389,7 @@ socket.on("data", chunk => { #### Source -[packages/quickjs-emscripten-core/src/context.ts:1431](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1431) +[packages/quickjs-emscripten-core/src/context.ts:1433](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1433) *** @@ -505,7 +505,7 @@ socket.write(dataLifetime?.value) #### Source -[packages/quickjs-emscripten-core/src/context.ts:1414](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1414) +[packages/quickjs-emscripten-core/src/context.ts:1416](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1416) *** @@ -643,7 +643,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics #### Source -[packages/quickjs-emscripten-core/src/context.ts:1440](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1440) +[packages/quickjs-emscripten-core/src/context.ts:1442](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1442) *** @@ -1611,7 +1611,7 @@ properties. #### Source -[packages/quickjs-emscripten-core/src/context.ts:1436](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1436) +[packages/quickjs-emscripten-core/src/context.ts:1438](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1438) *** diff --git a/doc/quickjs-emscripten-core/classes/QuickJSContext.md b/doc/quickjs-emscripten-core/classes/QuickJSContext.md index bf3f1ad7..d5c3af55 100644 --- a/doc/quickjs-emscripten-core/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten-core/classes/QuickJSContext.md @@ -409,7 +409,7 @@ socket.on("data", chunk => { #### Source -[packages/quickjs-emscripten-core/src/context.ts:1431](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1431) +[packages/quickjs-emscripten-core/src/context.ts:1433](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1433) *** @@ -521,7 +521,7 @@ socket.write(dataLifetime?.value) #### Source -[packages/quickjs-emscripten-core/src/context.ts:1414](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1414) +[packages/quickjs-emscripten-core/src/context.ts:1416](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1416) *** @@ -625,7 +625,7 @@ interrupted, the error will have name `InternalError` and message #### Source -[packages/quickjs-emscripten-core/src/context.ts:1440](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1440) +[packages/quickjs-emscripten-core/src/context.ts:1442](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1442) *** @@ -1469,7 +1469,7 @@ properties. #### Source -[packages/quickjs-emscripten-core/src/context.ts:1436](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1436) +[packages/quickjs-emscripten-core/src/context.ts:1438](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1438) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifyError.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifyError.md index f8b54767..f54e832f 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifyError.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifyError.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L29) +[packages/quickjs-emscripten-core/src/errors.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L33) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifySuspended.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifySuspended.md index c2dcd778..05168843 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifySuspended.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSAsyncifySuspended.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L33) +[packages/quickjs-emscripten-core/src/errors.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L37) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md index 3a6e4a62..38907f4d 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L53) +[packages/quickjs-emscripten-core/src/errors.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L57) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md index 0d707d15..6de3198c 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L41) +[packages/quickjs-emscripten-core/src/errors.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L45) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSMemoryLeakDetected.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSMemoryLeakDetected.md index 1c04616d..85c5385a 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSMemoryLeakDetected.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSMemoryLeakDetected.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L37) +[packages/quickjs-emscripten-core/src/errors.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L41) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSNotImplemented.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSNotImplemented.md index 5584d60a..ab28b86a 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSNotImplemented.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSNotImplemented.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:25](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L25) +[packages/quickjs-emscripten-core/src/errors.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L29) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSPromisePending.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSPromisePending.md index 507d45e6..48153e06 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSPromisePending.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSPromisePending.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L49) +[packages/quickjs-emscripten-core/src/errors.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L53) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnknownIntrinsic.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnknownIntrinsic.md index 92d051fc..6cd58c47 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnknownIntrinsic.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnknownIntrinsic.md @@ -73,7 +73,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L45) +[packages/quickjs-emscripten-core/src/errors.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L49) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnwrapError.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnwrapError.md index 107581ae..69367ca2 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnwrapError.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUnwrapError.md @@ -12,9 +12,10 @@ Error thrown if [QuickJSContext#unwrapResult](../../../classes/QuickJSContext.md - [Extends](QuickJSUnwrapError.md#extends) - [Constructors](QuickJSUnwrapError.md#constructors) - - [new QuickJSUnwrapError(cause)](QuickJSUnwrapError.md#new-quickjsunwraperrorcause) + - [new QuickJSUnwrapError(cause, context)](QuickJSUnwrapError.md#new-quickjsunwraperrorcause-context) - [Properties](QuickJSUnwrapError.md#properties) - [cause](QuickJSUnwrapError.md#cause) + - [context?](QuickJSUnwrapError.md#context) - [name](QuickJSUnwrapError.md#name) ## Extends @@ -23,14 +24,16 @@ Error thrown if [QuickJSContext#unwrapResult](../../../classes/QuickJSContext.md ## Constructors -### new QuickJSUnwrapError(cause) +### new QuickJSUnwrapError(cause, context) -> **new QuickJSUnwrapError**(`cause`): [`QuickJSUnwrapError`](QuickJSUnwrapError.md) +> **new QuickJSUnwrapError**(`cause`, `context`?): [`QuickJSUnwrapError`](QuickJSUnwrapError.md) #### Parameters • **cause**: `unknown` +• **context?**: [`QuickJSContext`](../../../classes/QuickJSContext.md) + #### Returns [`QuickJSUnwrapError`](QuickJSUnwrapError.md) @@ -55,6 +58,16 @@ Error thrown if [QuickJSContext#unwrapResult](../../../classes/QuickJSContext.md *** +### context? + +> **context**?: [`QuickJSContext`](../../../classes/QuickJSContext.md) + +#### Source + +[packages/quickjs-emscripten-core/src/errors.ts:10](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L10) + +*** + ### name > **name**: `string` = `"QuickJSUnwrapError"` diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUseAfterFree.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUseAfterFree.md index aada20cf..5b9a0df9 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUseAfterFree.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSUseAfterFree.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:21](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L21) +[packages/quickjs-emscripten-core/src/errors.ts:25](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L25) *** diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSWrongOwner.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSWrongOwner.md index 42411823..17405113 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSWrongOwner.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSWrongOwner.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L17) +[packages/quickjs-emscripten-core/src/errors.ts:21](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L21) *** diff --git a/doc/quickjs-emscripten/README.md b/doc/quickjs-emscripten/README.md index 1f70bb38..56d90b3d 100644 --- a/doc/quickjs-emscripten/README.md +++ b/doc/quickjs-emscripten/README.md @@ -48,7 +48,7 @@ main() [values]: #interfacing-with-the-interpreter [asyncify]: #asyncify [functions]: #exposing-apis -[quickjs-for-quickjs]: https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-for-quickjs +[quickjs-for-quickjs]: https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-for-quickjs - [quickjs-emscripten](#quickjs-emscripten) - [Usage](#usage) diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md index d5fdcc5b..a7cd9387 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md @@ -389,7 +389,7 @@ socket.on("data", chunk => { #### Source -[packages/quickjs-emscripten-core/src/context.ts:1431](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1431) +[packages/quickjs-emscripten-core/src/context.ts:1433](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1433) *** @@ -505,7 +505,7 @@ socket.write(dataLifetime?.value) #### Source -[packages/quickjs-emscripten-core/src/context.ts:1414](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1414) +[packages/quickjs-emscripten-core/src/context.ts:1416](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1416) *** @@ -643,7 +643,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics #### Source -[packages/quickjs-emscripten-core/src/context.ts:1440](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1440) +[packages/quickjs-emscripten-core/src/context.ts:1442](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1442) *** @@ -1611,7 +1611,7 @@ properties. #### Source -[packages/quickjs-emscripten-core/src/context.ts:1436](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1436) +[packages/quickjs-emscripten-core/src/context.ts:1438](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1438) *** diff --git a/doc/quickjs-emscripten/classes/QuickJSContext.md b/doc/quickjs-emscripten/classes/QuickJSContext.md index 00d400b9..7544241e 100644 --- a/doc/quickjs-emscripten/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSContext.md @@ -409,7 +409,7 @@ socket.on("data", chunk => { #### Source -[packages/quickjs-emscripten-core/src/context.ts:1431](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1431) +[packages/quickjs-emscripten-core/src/context.ts:1433](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1433) *** @@ -521,7 +521,7 @@ socket.write(dataLifetime?.value) #### Source -[packages/quickjs-emscripten-core/src/context.ts:1414](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1414) +[packages/quickjs-emscripten-core/src/context.ts:1416](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1416) *** @@ -625,7 +625,7 @@ interrupted, the error will have name `InternalError` and message #### Source -[packages/quickjs-emscripten-core/src/context.ts:1440](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1440) +[packages/quickjs-emscripten-core/src/context.ts:1442](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1442) *** @@ -1469,7 +1469,7 @@ properties. #### Source -[packages/quickjs-emscripten-core/src/context.ts:1436](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1436) +[packages/quickjs-emscripten-core/src/context.ts:1438](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/context.ts#L1438) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifyError.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifyError.md index 16145711..7645b7f0 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifyError.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifyError.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L29) +[packages/quickjs-emscripten-core/src/errors.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L33) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifySuspended.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifySuspended.md index fb19558d..1eb66f9a 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifySuspended.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSAsyncifySuspended.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L33) +[packages/quickjs-emscripten-core/src/errors.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L37) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md index a1d39aba..1f7a442c 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmptyGetOwnPropertyNames.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L53) +[packages/quickjs-emscripten-core/src/errors.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L57) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmscriptenModuleError.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmscriptenModuleError.md index 4b72410f..92f4ea54 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmscriptenModuleError.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSEmscriptenModuleError.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L41) +[packages/quickjs-emscripten-core/src/errors.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L45) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSMemoryLeakDetected.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSMemoryLeakDetected.md index 37f52310..631e1e49 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSMemoryLeakDetected.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSMemoryLeakDetected.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L37) +[packages/quickjs-emscripten-core/src/errors.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L41) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSNotImplemented.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSNotImplemented.md index 6e079b5c..f450c81b 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSNotImplemented.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSNotImplemented.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:25](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L25) +[packages/quickjs-emscripten-core/src/errors.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L29) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSPromisePending.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSPromisePending.md index dac6d304..b23993ed 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSPromisePending.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSPromisePending.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L49) +[packages/quickjs-emscripten-core/src/errors.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L53) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnknownIntrinsic.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnknownIntrinsic.md index d1f7d950..42959ad2 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnknownIntrinsic.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnknownIntrinsic.md @@ -73,7 +73,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L45) +[packages/quickjs-emscripten-core/src/errors.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L49) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnwrapError.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnwrapError.md index 085c7c0e..2b7e83e1 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnwrapError.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUnwrapError.md @@ -12,9 +12,10 @@ Error thrown if [QuickJSContext#unwrapResult](../../../classes/QuickJSContext.md - [Extends](QuickJSUnwrapError.md#extends) - [Constructors](QuickJSUnwrapError.md#constructors) - - [new QuickJSUnwrapError(cause)](QuickJSUnwrapError.md#new-quickjsunwraperrorcause) + - [new QuickJSUnwrapError(cause, context)](QuickJSUnwrapError.md#new-quickjsunwraperrorcause-context) - [Properties](QuickJSUnwrapError.md#properties) - [cause](QuickJSUnwrapError.md#cause) + - [context?](QuickJSUnwrapError.md#context) - [name](QuickJSUnwrapError.md#name) ## Extends @@ -23,14 +24,16 @@ Error thrown if [QuickJSContext#unwrapResult](../../../classes/QuickJSContext.md ## Constructors -### new QuickJSUnwrapError(cause) +### new QuickJSUnwrapError(cause, context) -> **new QuickJSUnwrapError**(`cause`): [`QuickJSUnwrapError`](QuickJSUnwrapError.md) +> **new QuickJSUnwrapError**(`cause`, `context`?): [`QuickJSUnwrapError`](QuickJSUnwrapError.md) #### Parameters • **cause**: `unknown` +• **context?**: [`QuickJSContext`](../../../classes/QuickJSContext.md) + #### Returns [`QuickJSUnwrapError`](QuickJSUnwrapError.md) @@ -55,6 +58,16 @@ Error thrown if [QuickJSContext#unwrapResult](../../../classes/QuickJSContext.md *** +### context? + +> **context**?: [`QuickJSContext`](../../../classes/QuickJSContext.md) + +#### Source + +[packages/quickjs-emscripten-core/src/errors.ts:10](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L10) + +*** + ### name > **name**: `string` = `"QuickJSUnwrapError"` diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUseAfterFree.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUseAfterFree.md index e896dbc1..cf73087c 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUseAfterFree.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSUseAfterFree.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:21](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L21) +[packages/quickjs-emscripten-core/src/errors.ts:25](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L25) *** diff --git a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSWrongOwner.md b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSWrongOwner.md index 6e35723f..acc3b09e 100644 --- a/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSWrongOwner.md +++ b/doc/quickjs-emscripten/namespaces/errors/classes/QuickJSWrongOwner.md @@ -52,7 +52,7 @@ node\_modules/typescript/lib/lib.es5.d.ts:1081 #### Source -[packages/quickjs-emscripten-core/src/errors.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L17) +[packages/quickjs-emscripten-core/src/errors.ts:21](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L21) *** diff --git a/packages/quickjs-emscripten-core/src/context.ts b/packages/quickjs-emscripten-core/src/context.ts index 413f39ff..d2a19bdb 100644 --- a/packages/quickjs-emscripten-core/src/context.ts +++ b/packages/quickjs-emscripten-core/src/context.ts @@ -1276,13 +1276,13 @@ export class QuickJSContext */ unwrapResult(result: SuccessOrFail): T { if (result.error) { - // const context: QuickJSContext = - // "context" in result.error ? (result.error as { context: QuickJSContext }).context : this + const context: QuickJSContext = + "context" in result.error ? (result.error as { context: QuickJSContext }).context : this const cause = result.error.consume((error) => this.dump(error)) if (cause && typeof cause === "object" && typeof cause.message === "string") { const { message, name, stack, ...rest } = cause - const exception = new QuickJSUnwrapError(cause) + const exception = new QuickJSUnwrapError(cause, context) if (typeof name === "string") { exception.name = cause.name diff --git a/packages/quickjs-emscripten-core/src/errors.ts b/packages/quickjs-emscripten-core/src/errors.ts index bac45263..af491e54 100644 --- a/packages/quickjs-emscripten-core/src/errors.ts +++ b/packages/quickjs-emscripten-core/src/errors.ts @@ -7,9 +7,13 @@ export class QuickJSUnwrapError extends Error { name = "QuickJSUnwrapError" constructor( public cause: unknown, - // public context?: QuickJSContext, + public context?: QuickJSContext, ) { - super(String(cause)) + const message = + typeof cause === "object" && cause && "message" in cause + ? String(cause.message) + : String(cause) + super(message) } } diff --git a/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile b/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile index 9c361420..c2c747b1 100644 --- a/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile +++ b/packages/variant-quickjs-asmjs-mjs-release-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile index 0c7b8510..ea48ca33 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile index 4ed5ea56..36067ae0 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile index f19d7c40..185af7f9 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile b/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile index 9fdbb5e2..90b76bb5 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile index 0220c700..1af33311 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile index 99753be5..2a6c54fa 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile index 7b621a43..f53e8146 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile index c26d0df3..1146faf5 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile index 3d1bc746..87928077 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile index 8736d1ca..3b4463c7 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile index 1a9147ff..02db7231 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile index 420d3e11..6544dc2a 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile index 35d57242..484eb232 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile index 047b64a1..d860f1b1 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile index 3bc6fe6d..933420fc 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile index cb82ebb1..bdb38fba 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile index 6cfd4321..8439dc44 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-wasmfile-debug-sync/Makefile index 415ec9b8..43aa0e01 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile index f2559296..aa201af7 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0 diff --git a/packages/variant-quickjs-wasmfile-release-sync/Makefile b/packages/variant-quickjs-wasmfile-release-sync/Makefile index 4dd86c44..9e550759 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-release-sync/Makefile @@ -45,6 +45,7 @@ CFLAGS_WASM+=-s EXPORT_NAME=QuickJSRaw CFLAGS_WASM+=-s INVOKE_RUN=0 CFLAGS_WASM+=-s ALLOW_MEMORY_GROWTH=1 CFLAGS_WASM+=-s ALLOW_TABLE_GROWTH=1 +CFLAGS_WASM+=-s STACK_SIZE=5MB # CFLAGS_WASM+=-s MINIMAL_RUNTIME=1 # Appears to break MODULARIZE CFLAGS_WASM+=-s SUPPORT_ERRNO=0