From c7a32294940c54294b96c0d0d789e0cffb1c03b3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 13 Aug 2015 11:59:43 +0100 Subject: [PATCH] Can't tell if failure to create a JS context is an error or not. It won't create one when built jsoff. --- desktop/browser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/browser.c b/desktop/browser.c index 16dd2e278..18c7fa247 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -857,9 +857,8 @@ nserror browser_window_initialise_common(enum browser_window_create_flags flags, bw->jsctx = js_newcontext(nsoption_int(script_timeout), slow_script, NULL); - if (bw->jsctx == NULL) { - return NSERROR_NOMEM; - } + /* If bw->jsctx == NULL, it might be because we built with no JS. + * TODO: Error handling in the with JS case. */ if (flags & BW_CREATE_CLONE) { assert(existing != NULL);