diff options
author | portix <none@none> | 2012-07-24 18:28:30 +0200 |
---|---|---|
committer | portix <none@none> | 2012-07-24 18:28:30 +0200 |
commit | 494cebc041f9e78ed45cea34cb0605d7d3a9090e (patch) | |
tree | 886aeec85b55c6d519096be337c6a6c55b022ae2 /src | |
parent | 93fb3652107ad443d5edb79f591d9b29f8980ed5 (diff) | |
download | dwb-494cebc041f9e78ed45cea34cb0605d7d3a9090e.zip |
Don't throw exceptions for properties; check if data.userDataDir is null in extensions.js
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/scripts.c b/src/scripts.c index 3b07f70e..22590176 100644 --- a/src/scripts.c +++ b/src/scripts.c @@ -928,7 +928,6 @@ static JSValueRef data_get_config_dir(JSContextRef ctx, JSObjectRef object, JSStringRef js_name, JSValueRef* exception) { char *dir = util_build_path(); if (dir == NULL) { - js_make_exception(ctx, exception, EXCEPTION("configDir: cannot get config path.")); return JSValueMakeNull(ctx); } JSValueRef ret = js_char_to_value(ctx, dir); @@ -941,7 +940,6 @@ static JSValueRef data_get_system_data_dir(JSContextRef ctx, JSObjectRef object, JSStringRef js_name, JSValueRef* exception) { char *dir = util_get_system_data_dir(NULL); if (dir == NULL) { - js_make_exception(ctx, exception, EXCEPTION("systemDataDir: cannot get system data directory.")); return JSValueMakeNull(ctx); } JSValueRef ret = js_char_to_value(ctx, dir); @@ -954,7 +952,6 @@ static JSValueRef data_get_user_data_dir(JSContextRef ctx, JSObjectRef object, JSStringRef js_name, JSValueRef* exception) { char *dir = util_get_user_data_dir(NULL); if (dir == NULL) { - js_make_exception(ctx, exception, EXCEPTION("userDataDir: cannot get user data directory.")); return JSValueMakeNull(ctx); } JSValueRef ret = js_char_to_value(ctx, dir); @@ -968,7 +965,6 @@ data_get_user_data_dir(JSContextRef ctx, JSObjectRef object, JSStringRef js_name static JSValueRef system_get_env(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exc) { if (argc < 1) { - js_make_exception(ctx, exc, EXCEPTION("system.getEnv: missing argument")); return JSValueMakeNull(ctx); } char *name = js_value_to_char(ctx, argv[0], -1, exc); |