diff options
Diffstat (limited to 'src/bun.js/bindings/sqlite/JSSQLStatement.cpp')
-rw-r--r-- | src/bun.js/bindings/sqlite/JSSQLStatement.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bun.js/bindings/sqlite/JSSQLStatement.cpp b/src/bun.js/bindings/sqlite/JSSQLStatement.cpp index e36d2b809..72c7d9a07 100644 --- a/src/bun.js/bindings/sqlite/JSSQLStatement.cpp +++ b/src/bun.js/bindings/sqlite/JSSQLStatement.cpp @@ -695,6 +695,11 @@ JSC_DEFINE_HOST_FUNCTION(jsSQLStatementLoadExtensionFunction, (JSC::JSGlobalObje return JSValue::encode(JSC::jsUndefined()); } + if(sqlite3_compileoption_used("SQLITE_OMIT_LOAD_EXTENSION")) { + throwException(lexicalGlobalObject, scope, createError(lexicalGlobalObject, "This build of sqlite3 does not support dynamic extension loading"_s)); + return JSValue::encode(JSC::jsUndefined()); + } + auto entryPointStr = callFrame->argumentCount() > 2 && callFrame->argument(2).isString() ? callFrame->argument(2).toWTFString(lexicalGlobalObject) : String(); const char* entryPoint = entryPointStr.length() == 0 ? NULL : entryPointStr.utf8().data(); char* error; |