Can't tell if failure to create a JS context is an error or not.

It won't create one when built jsoff.
This commit is contained in:
Michael Drake 2015-08-13 11:59:43 +01:00
parent 379d97123a
commit c7a3229494

View File

@ -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);